1 org/json/Testjava/lang/Object()VCode  LineNumberTableLocalVariableTablethisLorg/json/Test;main([Ljava/lang/String;)Vorg/json/Test$1ObjA beany object@E  (Ljava/lang/String;DZ)Vn Ignore the stuff past the end.  org/json/XML   toJSONObject)(Ljava/lang/String;)Lorg/json/JSONObject; "$#java/lang/System %&outLjava/io/PrintStream; (*)org/json/JSONObject +,toString()Ljava/lang/String; .0/java/io/PrintStream 12println(Ljava/lang/String;)V4G{ "list of lists" : [ [1, 2, 3], [4, 5, 6], ] } (6 2 (8 +9(I)Ljava/lang/String; ; +<&(Ljava/lang/Object;)Ljava/lang/String;> Basic bread Flour Yeast Water Salt Mix all ingredients together. Knead thoroughly. Cover with a cloth, and leave for one hour in warm room. Knead again. Place in a bread baking tin. Cover with a cloth, and leave for one hour in warm room. Bake in the oven at 180(degrees)C for 30 minutes. .@ 1 BCorg/json/JSONML BE +F)(Lorg/json/JSONObject;)Ljava/lang/String; BH IJ toJSONArray((Ljava/lang/String;)Lorg/json/JSONArray; L8Morg/json/JSONArray BO +P((Lorg/json/JSONArray;)Ljava/lang/String;R

JSONML is a transformation between JSON and XML that preserves ordering of document features.

JSONML can work with JSON arrays or JSON objects.

Three
little
words

T Robert Smith
12345 Sixth Ave Anytown CA 98765-4321
(V W(Ljava/lang/Object;)VYs{ "entity": { "imageURL": "", "name": "IXXXXXXXXXXXXX", "id": 12336, "ratingCount": null, "averageRating": null } }[org/json/JSONStringer Z Z^ _`object()Lorg/json/JSONWriter;bsingle dfeorg/json/JSONWriter ghkey)(Ljava/lang/String;)Lorg/json/JSONWriter;j MARIE HAA'S dl mnvalue)(Ljava/lang/Object;)Lorg/json/JSONWriter;pJohnnyr MARIE HAA\'Stfoovbarxbaz dz {`array d^~quux Thanks, Josh! d ` endObject d `endArrayobj keys ( getNames'(Ljava/lang/Object;)[Ljava/lang/String; *ab Zz Z m(J)Lorg/json/JSONWriter; Zl empty-array Zfanswer* dnullfalse d m(Z)Lorg/json/JSONWriter;truebigS~ d m(D)Lorg/json/JSONWriter;small/Wk?KT empty-objectlong Ztwo Z Z@Xfffff ZYone Z* L6 LV L*java/lang/StringaStringaNumberaBoolean ( ((Ljava/lang/Object;[Ljava/lang/String;)VTesting JSONString interface ( put;(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;{slashes: '///', closetag: '', backslash:'\\', ei: {quotes: '"\''},eo: {a: '"quoted"', b:"don't"}, quotes: ["'", '"']}{foo: [true, false,9876543210, 0.0, 1.00000001, 1.000000000001, 1.00000000000000001, .00000000000000001, 2.00, 0.1, 2e100, -32,[],{}, "string"], to : null, op : 'Good',ten:10} postfix commentString98.6 JSONObject (  JSONArray L int ( *(Ljava/lang/String;I)Lorg/json/JSONObject;doubleEl7> ( *(Ljava/lang/String;D)Lorg/json/JSONObject; ( *(Ljava/lang/String;Z)Lorg/json/JSONObject; ( NULLLjava/lang/Object;boolzero\u2028
\u2029 
 (  J getJSONArray L (I)Lorg/json/JSONArray;@G\) L (D)Lorg/json/JSONArray; so "fine". L ((Ljava/lang/Object;)Lorg/json/JSONArray; so . L (Z)Lorg/json/JSONArray;!keys (# $*(Lorg/json/JSONObject;)[Ljava/lang/String;&java/lang/StringBuilder(String: %6 (+ ,- getDouble(Ljava/lang/String;)D %/ 01append(D)Ljava/lang/StringBuilder; %*4 bool: (6 78 getBoolean(Ljava/lang/String;)Z %: 0;(Z)Ljava/lang/StringBuilder;= to: ?to (A BC getString&(Ljava/lang/String;)Ljava/lang/String; %E 0F-(Ljava/lang/String;)Ljava/lang/StringBuilder;H true: J foo: %L 0M-(Ljava/lang/Object;)Ljava/lang/StringBuilder;O op: QopS ten: Uten (W XYgetInt(Ljava/lang/String;)I %[ 0\(I)Ljava/lang/StringBuilder;^ oops: `oops (b c8 optBooleaneFirst <content> This is "content". 3 JSON does not preserve the sequencing of elements and contents. III T H R E EContent text is an implied structure in XML. JSON does not have implied structure:7everything is explicit.!]]>gaunodostrestruequatrocinqoseisi kSample BookThis is chapter 1. It is not very long or interesting.This is chapter 2. Although it is longer than chapter 1, it is not any more interesting.m*o Fred fbs0001 Scerbo B qcRepository Address Special Collections LibraryABC UniversityMain Library, 40 Circle DriveOurtown, Pennsylvania17654 USAsdeluxe&"toot"&toot;Aeksbonusbonus2uXGET / HTTP/1.0 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T312461; Q312461) Host: www.nokko.com Connection: keep-alive Accept-encoding: gzip, deflate wx org/json/HTTP wE{HTTP/1.1 200 Oki Doki Date: Sun, 26 May 2002 17:38:52 GMT Server: Apache/1.3.23 (Unix) mod_perl/1.26 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html }d{nix: null, nux: false, null: 'null', 'Request-URI': '/', Method: 'GET', 'HTTP-Version': 'HTTP/1.0'}isNull: nix ( 8isNull has: ( 8has5 GOOGLEKEY '+search+' 0 10 true false latin1 latin1 {Envelope: {Body: {"ns1:doGoogleSearch": {oe: "latin1", filter: true, q: "'+search+'", key: "GOOGLEKEY", maxResults: 10, "SOAP-ENV:encodingStyle": "http://schemas.xmlsoap.org/soap/encoding/", start: 0, ie: "latin1", safeSearch:false, "xmlns:ns1": "urn:GoogleSearch"}}}}" f%oo = b+l=ah ; o;n%40e = t.wo org/json/CookieList E+f%oo=blah; secure ;expires = April 24, 2002 org/json/Cookie E{script: 'It is not allowed in HTML to send a close script tag in a stringso we insert a backslash before the /'}org/json/JSONTokener@{op:'test', to:'session', pre:1}{op:'test', to:'session', pre:2} 6 ( (Lorg/json/JSONTokener;)Vpre: pre ( YoptInt  skipTo(C)C . 1(I)VComma delimited list test, '"Strip"Quotes', 'quote, comma', No quotes, 'Single Quotes', "Double Quotes" 1,'2',"3" ,'It is "good,"', "It works." H org/json/CDL O/ ["", next is an implied null , , ok,] { fun => with non-standard forms ; forgiving => This package can be used to parse formats that are similar to but not stricting conforming to JSON; why=To make it easier to migrate existing data to JSON,one = [[1.00]]; uno=[[{1=>1}]];'+':+6e66 ;pluses=+++;empty = '' , 'double':0.666,true: TRUE, false: FALSE, null=NULL;[true] = [[!,@;*]]; string=> o. k. ; oct=0666; hex=0x666; dec=666; o=0999; noh=0x0x} It's all gooddecocthexmissing ( +(Lorg/json/JSONObject;[Ljava/lang/String;)V . 1Wm{string: "98.6", long: 2147483648, int: 2147483647, longer: 9223372036854775807, double: 9223372036854775808} getIntint long longer longerdouble string string getLong ( getLong(Ljava/lang/String;)J % 0(J)Ljava/lang/StringBuilder; getDouble good sized ( *(Ljava/lang/String;J)Lorg/json/JSONObject;B[2147483647, 2147483648, 9223372036854775807, 9223372036854775808] Keys: ( !()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;  <valueOf:  hasNext()Z accumulate: stoogeCurly (   accumulate LarryMoeShemp L )(ILjava/lang/Object;)Lorg/json/JSONArray; write:java/io/StringWriter  ( write"(Ljava/io/Writer;)Ljava/io/Writer;3122333!Content of the first chapterContent of the second chapter Content of the first subchapter Content of the second subchapterThird Chapter (# $(Ljava/util/Map;)V L& '(Ljava/util/Collection;)V) Joe DeRita (+ 0-stooges/ stoogearray (1 23get&(Ljava/lang/String;)Ljava/lang/Object;5map (7 88(Ljava/lang/String;Ljava/util/Map;)Lorg/json/JSONObject;: collection (< =?(Ljava/lang/String;Ljava/util/Collection;)Lorg/json/JSONObject;{ L@ A%(Ljava/util/Map;)Lorg/json/JSONArray; LC D,(Ljava/util/Collection;)Lorg/json/JSONArray;F{plist=Apple; AnimalSmells = { pig = piggish; lamb = lambish; worm = wormy; }; AnimalSounds = { pig = oink; lamb = baa; worm = baa; Lisa = "Why is the worm talking like a lamb?" } ; AnimalColors = { pig = pink; lamb = black; worm = pink; } } HH ("San Francisco", "New York", "Seoul", "London", "Seattle", "Shanghai")JxThe content of b and The content of cdoremiL Testing Exceptions: N Exception: .P Q2print .W 1X(D)VZhoward L\ ,](I)D L_ 2`(I)Ljava/lang/Object;d f h p{"koda": true, "koda": true}rbosanda t*ujava/lang/Exceptionargs[Ljava/lang/String;itLjava/util/Iterator;Lorg/json/JSONArray;jLorg/json/JSONObject;jjLorg/json/JSONStringer;sLjava/lang/String;objLorg/json/Test$1Obj;ar[IjasajtLorg/json/JSONTokener;iIcLjava/util/Collection;mLjava/util/Map;eLjava/lang/Exception; SourceFile Test.java InnerClassesObj!/*   wY:N!-'-3:(Y5N!-7-!-:-=:N!-7-!?AN!-'-!-D-!?GM!,K-!,N-!?Q:AN!-7-!-D-!?GM!,K-!,N-!?S:N!-7-(YUN!-'-X:(Y5N!-7-ZY\:]acikocqkscukwcy|}ckck:!-!ZY\]cyyyk-ZY\:W WWWW]WyWWkWWWWW|WWWWWWWWWW]WW]WöWWWWW!Ŷ-!LYŷK- YOYOYO:LY:!ȶ-YSYSYS: (Y N-W!-7-(Yڷ5N!-7-!-:-!ܶ-(Y޷5N-W-(YW-LYW-9W-W-W-W-W-W-W-W- W-s M,W,W,W,W,W,W,LYW,(YW- -"W!-7-!-:-!%Y')-*.2-!%Y3)-592-!%Y<)->@D2-!%YG)-@D2-!%YI)-s K2-!%YN)-P@D2-!%YR)-TVZ2-!%Y])-_a92-d:N!-7-!-:-!ܶ-G:!K-!N-!ܶ-f:G:!K-!N-!ܶ-h:N!-7-!-:-!ܶ-G:!K-!N-!ܶ-jN!-7-!-:-!ܶ-lN!-7-!-:-!ܶ-nN!-7-!-:-!ܶ-pN!-'-!-:-!ܶ-rN!-7-!-:-!ܶ-tvN!-7-!-y-!ܶ-zvN!-7-!-y-!ܶ-(Y|5N!-7-!%Y~)-92-!%Y)-92-!-:-!-y-!ܶ-N!-7-!-:-!ܶ-(Y5N!-7-!-:-!ܶ-N!-7-!--!ܶ-N!-7-!--!ܶ-(Y5N!-'-!ܶ-Y: (Y N!-'-!%Y)-Z2- {6 ! (Y N!-'-!ܶ-M,:!-!ܶ-!,K-!ܶ-M!,K-!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