src/main/java/pl/jalokim/propertiestojson/util/PropertiesToJsonConverter.java
public String convertFromValuesAsObjectMap(Map<String, Object> properties) throws ParsePropertiesException {
        ObjectJsonType coreObjectJsonType = new ObjectJsonType();
        for (String propertiesKey : getAllKeysFromProperties(properties)) {
            addFieldsToJsonObject(properties, coreObjectJsonType, propertiesKey);
        }
        return prettifyOfJson(coreObjectJsonType.toStringJson());
    }
public String convertFromValuesAsObjectMap(Map<String, Object> properties) throws ParsePropertiesException {
        ObjectJsonType coreObjectJsonType = new ObjectJsonType();
        for (String propertiesKey : getAllKeysFromProperties(properties)) {
            addFieldsToJsonObject(properties, coreObjectJsonType, propertiesKey);
        }
        return prettifyOfJson(coreObjectJsonType.toStringJson());
    }
generate Json by given Map&lt;String,Object&gt;

@param properties Java Map with properties
@return simple String with json
@throws ParsePropertiesException when structure of properties is not compatible with json structure