我Map<String,String>
在java中有这样的:
{card_switch=Master, issuing_bank=ICCI, card_Type=DebitCard}
我正在使用简单的 json 解析器将此映射解析为 json 对象。
我试过了 :
Object json = JSONValue.parse(entry.getKey());
但我收到一条错误消息:
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)
可以转换Map<String,String>
成json吗?