Created
February 8, 2013 07:42
-
-
Save s4553711/4737324 to your computer and use it in GitHub Desktop.
JSON in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.json.*; | |
public static void main(String[] args) { | |
// Declare Hashtable | |
Hashtable stor = new Hashtable(); | |
stor.put("Keya","a"); | |
stor.put("keyb","b") | |
// Declare JSONObject and initialization with stor | |
JSONObject jsonObject = new JSONObject(stor); | |
// Output | |
System.println(jsonObject.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment