public String convertToJson ( Properties properties ) throws ParsePropertiesException { for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { if ( ! ( entry . getKey ( ) instanceof String ) ) { throw new ParsePropertiesException ( format ( PROPERTY_KEY_NEEDS_TO_BE_STRING_TYPE , entry . getKey ( ) . getClass ( ) , entry . getKey ( ) == null ? "null" : entry . getKey ( ) ) ) ; } } return convertFromValuesAsObjectMap ( propertiesToMap ( properties ) ) ; }
generate Json by given Java Properties