"JSONObject toJson" instead of "String toJson"

Return a JSONObject instead of a string.
Adjusted the parsing methods to parse the Map instead
of a string.