How to ready JSON string to Map<> in Java not using external not using external libs

I know that to ready json string in Java, we could use Jackson or similar framework. My problem is that I cannot modify build scripts. Is there any quick way to ready json string into Map?

Any ideas? Performance or other issues are not important. Just write this as fast as possible.

E.g.

public class Foo {

public static void main(String... args) throws Throwable {

Map map = read("{\"key\" : \"val\"}");

}

public static Map read(String json) {

return null;

}

}...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts