src/main/java/pl/jalokim/propertiestojson/util/PropertiesToJsonConverter.java
public String convertFromValuesAsObjectMap(Map<String, Object> properties, String... includeDomainKeys) throws ParsePropertiesException {
        Map<String, Object> filteredProperties = new HashMap<>();
        for (String key : properties.keySet()) {
            for (String requiredKey : includeDomainKeys) {
                checkKey(properties, filteredProperties, key, requiredKey);
            }
        }
        return convertFromValuesAsObjectMap(filteredProperties);
    }
public String convertFromValuesAsObjectMap(Map<String, Object> properties, String... includeDomainKeys) throws ParsePropertiesException {
        Map<String, Object> filteredProperties = new HashMap<>();
        for (String key : properties.keySet()) {
            for (String requiredKey : includeDomainKeys) {
                checkKey(properties, filteredProperties, key, requiredKey);
            }
        }
        return convertFromValuesAsObjectMap(filteredProperties);
    }
public String convertFromValuesAsObjectMap ( Map < String , Object > properties , String ... includeDomainKeys ) throws ParsePropertiesException { Map < String , Object > filteredProperties = new HashMap <> ( ) ; for ( String key : properties . keySet ( ) ) { for ( String requiredKey : includeDomainKeys ) { checkKey ( properties , filteredProperties , key , requiredKey ) ; } } return convertFromValuesAsObjectMap ( filteredProperties ) ; }
generate Json by given Map&lt;String,String&gt; and given filter

@param properties        Java Map with properties
@param includeDomainKeys domain head keys which should be parsed to json <br>
example properties:<br>
object1.field1=value1<br>
object1.field2=value2<br>
someObject2.field2=value3<br>
filter "object1"<br>
will parse only nested domain for "object1"<br>
@return simple String with json
@throws ParsePropertiesException when structure of properties is not compatible with json structure
generate Json by given Map&lt ; String String&gt ; and given filter