tengo Map<String,String>
en Java como esto:Map <String, String> JSON en
{card_switch=Master, issuing_bank=ICCI, card_Type=DebitCard}
estoy usando el simple json parser para analizar este mapa en objeto JSON.
me trataron:
Object json = JSONValue.parse(entry.getKey());
pero me sale un mensaje de error:
Object json = JSONValue.parse(entry.getKey());
^
method JSONValue.parse(String) is not applicable
(actual argument Map<String,String> cannot be converted to String by method invocation conversion)
method JSONValue.parse(Reader) is not applicable
(actual argument Map<String,String> cannot be converted to Reader by method invocation conversion)
¿Eso es posible convertir Map<String,String>
en JSON?
tienen cansado GSON http://code.google.com/p/google-gson/ – Abubakkar
un vistazo a ejemplo 1.4 en esta página: http: // código .google.com/p/json-simple/wiki/EncodingExamples # Example_1-4 _-_ Encode_a_JSON_object _-_ Using_Map_and_streaming –