From 57938196283b3847d5706649d39ab8e82951eb7f Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Tue, 23 Jun 2015 17:59:47 +0200 Subject: [PATCH 1/9] Moved Sources to right package directory, created eclipse project --- .classpath | 6 ++++++ .project | 17 +++++++++++++++++ bin/.gitignore | 2 ++ README => src/README | 0 CDL.java => src/org/json/CDL.java | 0 Cookie.java => src/org/json/Cookie.java | 0 CookieList.java => src/org/json/CookieList.java | 0 HTTP.java => src/org/json/HTTP.java | 0 .../org/json/HTTPTokener.java | 0 JSONArray.java => src/org/json/JSONArray.java | 0 .../org/json/JSONException.java | 0 JSONML.java => src/org/json/JSONML.java | 0 JSONObject.java => src/org/json/JSONObject.java | 0 JSONString.java => src/org/json/JSONString.java | 0 .../org/json/JSONStringer.java | 0 .../org/json/JSONTokener.java | 0 JSONWriter.java => src/org/json/JSONWriter.java | 0 Property.java => src/org/json/Property.java | 0 XML.java => src/org/json/XML.java | 0 XMLTokener.java => src/org/json/XMLTokener.java | 0 20 files changed, 25 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 bin/.gitignore rename README => src/README (100%) rename CDL.java => src/org/json/CDL.java (100%) rename Cookie.java => src/org/json/Cookie.java (100%) rename CookieList.java => src/org/json/CookieList.java (100%) rename HTTP.java => src/org/json/HTTP.java (100%) rename HTTPTokener.java => src/org/json/HTTPTokener.java (100%) rename JSONArray.java => src/org/json/JSONArray.java (100%) rename JSONException.java => src/org/json/JSONException.java (100%) rename JSONML.java => src/org/json/JSONML.java (100%) rename JSONObject.java => src/org/json/JSONObject.java (100%) rename JSONString.java => src/org/json/JSONString.java (100%) rename JSONStringer.java => src/org/json/JSONStringer.java (100%) rename JSONTokener.java => src/org/json/JSONTokener.java (100%) rename JSONWriter.java => src/org/json/JSONWriter.java (100%) rename Property.java => src/org/json/Property.java (100%) rename XML.java => src/org/json/XML.java (100%) rename XMLTokener.java => src/org/json/XMLTokener.java (100%) diff --git a/.classpath b/.classpath new file mode 100644 index 000000000..fb5011632 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/.project b/.project new file mode 100644 index 000000000..c539d8f59 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + JSON-java + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 000000000..5dae02295 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +/README +/org/ diff --git a/README b/src/README similarity index 100% rename from README rename to src/README diff --git a/CDL.java b/src/org/json/CDL.java similarity index 100% rename from CDL.java rename to src/org/json/CDL.java diff --git a/Cookie.java b/src/org/json/Cookie.java similarity index 100% rename from Cookie.java rename to src/org/json/Cookie.java diff --git a/CookieList.java b/src/org/json/CookieList.java similarity index 100% rename from CookieList.java rename to src/org/json/CookieList.java diff --git a/HTTP.java b/src/org/json/HTTP.java similarity index 100% rename from HTTP.java rename to src/org/json/HTTP.java diff --git a/HTTPTokener.java b/src/org/json/HTTPTokener.java similarity index 100% rename from HTTPTokener.java rename to src/org/json/HTTPTokener.java diff --git a/JSONArray.java b/src/org/json/JSONArray.java similarity index 100% rename from JSONArray.java rename to src/org/json/JSONArray.java diff --git a/JSONException.java b/src/org/json/JSONException.java similarity index 100% rename from JSONException.java rename to src/org/json/JSONException.java diff --git a/JSONML.java b/src/org/json/JSONML.java similarity index 100% rename from JSONML.java rename to src/org/json/JSONML.java diff --git a/JSONObject.java b/src/org/json/JSONObject.java similarity index 100% rename from JSONObject.java rename to src/org/json/JSONObject.java diff --git a/JSONString.java b/src/org/json/JSONString.java similarity index 100% rename from JSONString.java rename to src/org/json/JSONString.java diff --git a/JSONStringer.java b/src/org/json/JSONStringer.java similarity index 100% rename from JSONStringer.java rename to src/org/json/JSONStringer.java diff --git a/JSONTokener.java b/src/org/json/JSONTokener.java similarity index 100% rename from JSONTokener.java rename to src/org/json/JSONTokener.java diff --git a/JSONWriter.java b/src/org/json/JSONWriter.java similarity index 100% rename from JSONWriter.java rename to src/org/json/JSONWriter.java diff --git a/Property.java b/src/org/json/Property.java similarity index 100% rename from Property.java rename to src/org/json/Property.java diff --git a/XML.java b/src/org/json/XML.java similarity index 100% rename from XML.java rename to src/org/json/XML.java diff --git a/XMLTokener.java b/src/org/json/XMLTokener.java similarity index 100% rename from XMLTokener.java rename to src/org/json/XMLTokener.java From 0f191395cd4b86a946113a71135a9a0e187722f2 Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Tue, 23 Jun 2015 18:00:59 +0200 Subject: [PATCH 2/9] Moved Readme back to root folder --- src/README => README | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/README => README (100%) diff --git a/src/README b/README similarity index 100% rename from src/README rename to README From c49bbfb021b615381d18f76172811d120fc3804f Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Sat, 4 Jul 2015 00:51:51 +0200 Subject: [PATCH 3/9] gitignore --- bin/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/.gitignore b/bin/.gitignore index 5dae02295..cf1db2eed 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,2 +1 @@ -/README /org/ From afe45d364221157497e40e583fb51908808bc54e Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Fri, 7 Aug 2015 01:52:00 +0200 Subject: [PATCH 4/9] asdf --- bin/.gitignore | 1 - bin/org/json/CDL.class | Bin 0 -> 4429 bytes bin/org/json/Cookie.class | Bin 0 -> 3154 bytes bin/org/json/CookieList.class | Bin 0 -> 1985 bytes bin/org/json/HTTP.class | Bin 0 -> 2586 bytes bin/org/json/HTTPTokener.class | Bin 0 -> 1106 bytes bin/org/json/JSONArray.class | Bin 0 -> 12721 bytes bin/org/json/JSONException.class | Bin 0 -> 754 bytes bin/org/json/JSONML.class | Bin 0 -> 6655 bytes bin/org/json/JSONObject$Null.class | Bin 0 -> 793 bytes bin/org/json/JSONObject.class | Bin 0 -> 23171 bytes bin/org/json/JSONString.class | Bin 0 -> 156 bytes bin/org/json/JSONStringer.class | Bin 0 -> 604 bytes bin/org/json/JSONTokener.class | Bin 0 -> 6023 bytes bin/org/json/JSONWriter.class | Bin 0 -> 4124 bytes bin/org/json/Property.class | Bin 0 -> 1747 bytes bin/org/json/XML.class | Bin 0 -> 7594 bytes bin/org/json/XMLTokener.class | Bin 0 -> 4797 bytes 18 files changed, 1 deletion(-) delete mode 100644 bin/.gitignore create mode 100644 bin/org/json/CDL.class create mode 100644 bin/org/json/Cookie.class create mode 100644 bin/org/json/CookieList.class create mode 100644 bin/org/json/HTTP.class create mode 100644 bin/org/json/HTTPTokener.class create mode 100644 bin/org/json/JSONArray.class create mode 100644 bin/org/json/JSONException.class create mode 100644 bin/org/json/JSONML.class create mode 100644 bin/org/json/JSONObject$Null.class create mode 100644 bin/org/json/JSONObject.class create mode 100644 bin/org/json/JSONString.class create mode 100644 bin/org/json/JSONStringer.class create mode 100644 bin/org/json/JSONTokener.class create mode 100644 bin/org/json/JSONWriter.class create mode 100644 bin/org/json/Property.class create mode 100644 bin/org/json/XML.class create mode 100644 bin/org/json/XMLTokener.class diff --git a/bin/.gitignore b/bin/.gitignore deleted file mode 100644 index cf1db2eed..000000000 --- a/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/org/ diff --git a/bin/org/json/CDL.class b/bin/org/json/CDL.class new file mode 100644 index 0000000000000000000000000000000000000000..ceeef9a18b69d7d4f272d4de8a407c4c07435e71 GIT binary patch literal 4429 zcmZ`+TX0j?635Eh`wN@SB_S(0(v5QkzQ1_Qxhn-CjZ`bZ<&7b9aNTat-W zT1ZpcJlZrNp@k5Faht?6w2k{w!GxK#na;S=esubuPWqTmJN@WSKiZJNb=NspmMu$+ z=1S+@bIyLOwe~(&zx&^N?*n)M?`p6J=;_RG%SbkzYU$Y3rNJiP9Z8%_w2UTF!z~8} zMvTFnfMaVimCS7yutu5=3)ni+LxvkxxOCXz5UA-&ri`A669Y!3FEKD`2>80vgNf0@ ziA+-77arPj$C6or>aOKJ+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>$vN|7`3ojwR#DERF8t+g^W?GH)G- z`fsB>8n}(ts6P@}hz4eF^(rgArgW73%_-p%@fe2$XVW7yqMuojFJ7syIL%hEo5Qyg zw|V2g;oI>o%lVGYvW79Nvx)DpN$;{jzb7E8d=fVt5YD*OcrEIuT+RhSe+37QCW7tG v1s{EnJCj7A*ZuS-XT=!p?{XDzVAG)dh~3Vx_yKJq`(I)w@E2y;gung|Ay}(? literal 0 HcmV?d00001 diff --git a/bin/org/json/CookieList.class b/bin/org/json/CookieList.class new file mode 100644 index 0000000000000000000000000000000000000000..80c3d23e4931e654ac35a0f25ea391a976388967 GIT binary patch literal 1985 zcmZ`(ZCe{f6g`tHY!bFYA*Ld2mD*wgp%GiEl7KC-ZxDhdNQ74HCaka_?B+=}KJ=%^ zALv*8lGftW$It!&e~sdq-Mo+{eAt=UJ9o~#_uMn{_kVBR0=NZBg->A2uI?pDHQP$0 zZTrA9GG@(Dp$LqW^k4KuS-18Q>xGh0bOZ)dre!)y0{&=hOF&86yG96p1T_p`P+&M? zT1K{hSTL%adZBCxjArbjUf$BHru=Uj6=&b93A~@_6FMoNIrd6!J=+Qzi)K2R#jEz3A^Hf`yej`h|M!pFF#Vv@AAV|gvm@CmL91nQPiE9w=} zIMpv$KgbBCG<=FEnJW3 z&vA?44(%%Qr9O5@K+WxzR6$P%1$-q*%{h$}M{HjAUb6@6vSR6n400jo=*5FIz0#Cb zz_C4f2v9R^PCMOYJw16yYQENR7x##JV7#C%BhjW`-7(9F$Bt3e9lM%Tkruf0F2Hi# zEbmHXEF(CC2Y967Aq#fhy3R|&9#dB>@G}>S(5qed%_~Euwx%JAby8{8vh{NL9NF#2 z@J}>sAV*idQZcMufy@15*UUF5)%Tr-Eh)4?Pi7M2dkL~FFxy8Tz3jEX0(dGQ7G=Ue zX!ucL2KNldD?_sKT!Svgvddp+yolH0x-_s4ts z*~-XO&)JvfMWyxnG%M=@O!WXIml!0Jv+LEO@xYW%*>LB5yeZp@Nl@r~Nx@Ob2au!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18=0wQkh8vDM!|Y6oz1IkhGAjC7IWra%^hoq7K12(hmRaa+Tjp>wpmy4!JpnahZz7DKsUV_iQ!W)Q(WTed->^5>`8%%`R1T zn^#Q%uCLExV~{H=Qs1x_X?0LI`I-E@!0e+tx%ViUw`9XzcEc~Cf%{8r(Pj8>g{P}* z_BHIpJ7~vsL~w)6dY7%ei4_Fb-{W)qM9VzBzr7Wb*P{+6&+haopJG+zJWkVY7!j$DY%hw z!&W!N(HY(QBi#8L+*xnZ%7-v6@{)Vceeaxe-_7^mpT7dQfoTZ=hEB^~O|LtanZ92r zJT6!p!W6cI&{1SD|7fX!Ff`2=rs3XVh{kj4{54OPxw)FoyS8DjW)jN`p{!LB3W5l$ zID;mJ)|_FArLE1PunW9c77Xnx(4i@x*B*%KWx2Dz0Ifj)YEPIw0~49)J?M7`p$ZnA8yfF=#vm*=r}wmyT)y2DB*~AMO1El|{ zNmZMM$z4&3)oqV>OoJ-oNH8=zZ%mhO&)c?TGYp@05ri6a) zM^vP7joQpB6=9YbdP&cTHa6No*THmpvh=)S2slNCp8piL2z)LKmh|vTmSZxCPH} z9iwEh9|QEKkCH)|>c=on+!Mq)2f0S6kVG}qgD6l#w;y_q_Cp#-LK*YJw(#Hb2CjJR Ko1~KhnEC^#GV9*} literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONArray.class b/bin/org/json/JSONArray.class new file mode 100644 index 0000000000000000000000000000000000000000..c6c9202b6d405bc59a566108a66329faf80b14e5 GIT binary patch literal 12721 zcmbtb3w%^png5@;liXyuAt51wGy$ei44H(`C#?i1ghvYvp#=&CitRuK7)WN)nF)`& z+J}AntkhO&U%0zsTPn0`6AEgJ)uPpP)w-+edtKey-PLui*2kjR|98%vJ9i!_TFWmp z_nv#s_xyj~`ObHzFa7EGX8~NG4%i4N)FxBg=j==;6LVIsUEQ-dm5T1O5mczz8QmS7 z(;rQ2pR;<)&e+zBjdIS;jjqVVQqe8_F@v5iW#avFyx~rT%C+(B ziD+gh#TBik=FB&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dkndq|4!Ah$IS6Zz;?bdh^y2iuj8Xc=9c<7~>6YVO74qr*RiC`P`%hvJ@ zuCU`x9j_>=zZ}vj*}4dhH5Zeti!qtkvKN|jRPkOY@ycRs66+vlWqIXgc&ZD@QTi}L zZ6~1~kY<%WQ#H4-0^?!g5gCz&ngJ*;H-ng=jJhIuU=GSYL~nMZ?Cu^Nc1WcMFd7i?<@Dy?ON%5pSXm!Zj8fv~j_ zE!Gt{&+5iotyNfV_26>rN*eqsY_`_mT5BER*45a>xoPWd+71hiQl1lrc+QkGIUd{H zquLbyn9{U2Td-8Uolk@Oq3k?$Ew9RSersfZ^E7|Se43X3qizP$cn!bDIHFNqrzEfB zqwxqyNIqG>KJ^49^4C~ViZ!XUG-Nt@N7R;8V$AyXwkgAEtC;k*VHMN;U73Gy^i^L6 zb1FRsYX@pA_WrG1XtvnHUmMtH2-b+ntccgb?nx)J5pO?1@FS^xvMY>k(#_f7HR zomu3~W0AE!>{@Hu2{k~=Bv&ya2YY)y7ipJ+Wrn5S>=%yCe&IPTtY))Q-kda38~OHi zc&!gHDEFh{B<8o?6o5hUsdbE(HdYm-n?ZkdI zE(9iX%i3x-4Xaz~%YyQXNdn*E0ls<4F?Bn`e^Y(g0j!_WeBIn~Yp#6=7u5&3rMK14 zY_~MC=h0RZ;#FIH`7w33UR-a>YPr9CLvU{JR$JBE^<@V~U-Hc+?YrA*Hp{}J^McYe zYz&U5_dln7e>?6__qfJR&;_ub0kvmTaR)|}X{T`CUQuii`NN|ke~+RxG?$Tjl9>m~;AdHfOfy}T;t+mHD= z2>6RqcF|u_f;|C23o01diV;!GLw#lQALN})aFl_kUv%*GuM$+;!~ZAaK28s)`?W{` H^^yMvX7cA; literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONException.class b/bin/org/json/JSONException.class new file mode 100644 index 0000000000000000000000000000000000000000..bc646c9bb7a807bd248488b74288633e40d52eeb GIT binary patch literal 754 zcmZvZOHbQC6ot=C;y4&%ULnvFLU}AmBGrp7L2S}iB1);$(CmkFWCkT;l0C1w5 zLi1XD7XC!&!2giyL`~)FJ7Fc3krI=UjAHhGJbO)`K4GaB>NpWP8Hq_ME$(C?2WCrYd2lnqC7j$slh9UQkugi0^`BpsBo;=;ueVR@jmJWr>W zGP=khgtb99=178rah;2mm`0yJKbMc{%*XhygEj$Gh+j5TsIzF zSVx^J_Osq#M#kFAS^b>lb-K6MVqB;D6Rm>jnPl6jVTb#-=D6OB>zR}p_l21y%jlav dfYted);AVP$RcLL0d0eE&ECo}gni>WcmVI%mk$5{ literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONML.class b/bin/org/json/JSONML.class new file mode 100644 index 0000000000000000000000000000000000000000..a8b7f58fa236c0256ea4bd5ef61771caa33c9768 GIT binary patch literal 6655 zcmai2dtg-MmH(ZadFP@b3BokU28ssq;9**1ClJNRBbo#>ArYvLNf<&PnF%u!1Qn&0 zy4Kp-uB{r1RIL)NsDSPyLgk?~s9TGcwN})1-L|&fZM)rVZP!wq{hfPnCQsczCb{4D zo$q|-obUX8=iK|s#|IAsC>MBP2+oehTW4=b#G>UB`NSMXp6QbD+O6IW;P03Rk5{^0J7jW;f9BLYTBZax~`7qNW3B3+#V6+*2G%E z?Tz7hn~t4HS8{z@LNLB&#IY3ucV{@B;J(TkgNs+y)-=R6Mxv2;#p=OXwRBND9^P6p zvu32FR1{der6tmtY>Pz`UgQeS8Fp4?F@SuWJQEW!iGFs(;iz$Na#MWpsyk&7b9*YY~XAH5aJ{fO|w$jYZ32J-BgbGztXksd+ zQB5?mC0P}VCL>YCJAcL)zWFg7=X-IUz|1J5F(!&ILtxZ22qp|Uy=r|p9&Sl8czRB; zi4r}>ujg1%^`eZ<4@NK}ujkA*F-Nt!>uVO(FZ1GpVQFDI=Edg(69*O8vzK(WwXcoD zeV8YhzIaO~^Cz;lFkINu9!oG9h0$(9G99{j3okJ zGG@zUxujtFVfeBsR8nt_UY6GiK~otMD2VUr>~~n!_y{ zeYl3#T6O87hDD0t>r8~v%(zB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*e{-qEs~2HBp;h(B5smt*e)~K_LbsR zDaY+n!OpA^UzMwIr>w)*B*qRbfxF~Jd_!)*H{~|mEnmU6fgZ56KJYk(cqPyobl+13WIj#a{Uno{+!dNyETXh9CQlNjP8>;AvwD zo-vBB(cmr=6Kf}Am+xUg?9)4;38Xp*c#IKAG z`TP-UfHGgF&1vYtqa2al@EGGvy5!U2*vsz=FXI|KfhT#>cjD`K3j4^3S=_&$b8g0b z4i4aH=77ieGjC@vxzf*5{s}44aG~)QdeO)1FpWRpi`)^wv&^1i6s4Ii*EE*_*Q`LLMAy3eA4BNV~$-N-xIf`wy zr74^Wxq46^bUllI6-IY%T^Y5MvWon>mY{yjr>a6*6<1D>jHxtdp*@o`%{jzBxMWXJ z-!BC_(~psNT?<$y9-ikenBaa8=WzFIXE&RKlTAIihf~&LaX|{d4taKn1U>y&rPh+d z^XY^qh5vMp=wV^7-LMwuMjw8wX7!**7h0Viy#7A?m%VV7qe4e&MfyG-=>%xN8ZB&= zZvy$@5 zMk^UjDf2!4NQ~tcH=f3FWmjFMu##(LNjb;bHfnxKW}YfD^4_9JlLF__5WZ)O!c)70 zr)CFFHO0BxHT#LDu`ohLQu{7^`pr}KoAJwJ%3 zarS{On` z({hjyI)uaW1H35D;UzhY6LN%a&_{7fjuAr7;{$d%zn354w7e)D>6bh?E>q+sDUp|D zmb@bK<)|!@AIma1A#bPY=ML?YEJSC-elLOeT2c^Qx?FonBk2U zgk1FIJPSf@yn)*-2zl^6yG4bN0_RExI34)>2;kT|KO*E5I0qFt=W3?22Pjtz*sTZB zm^Nfq@kG5OuG0vo!TfhND53@z(|j{@RV PO+ybOa6hKC2GairHLXn6 literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONObject$Null.class b/bin/org/json/JSONObject$Null.class new file mode 100644 index 0000000000000000000000000000000000000000..8ac984fa1247547d3cb882b0e350c89bbf6a7532 GIT binary patch literal 793 zcmZ`%J#W)c6g}6@SKXuuN%}$h0hNlBq=1nai@H=oq6+DdDn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Z!K*#70WZb@&USs<~X+5cDFwPH#avwN$pT zL$Hn|$C^QT)=Vn4X3-dHHchnV&@^i<9cLX!)fRr3U@f3^*74MAEuu|UHEqUoi&aBc zT8n9`bpqXMok%~lme3w+DebqG(Tmm!dfi$HX{@D>tU5YuolHH}YT>m`RlGbIk_XNx z4nly0Pnk4$Oti7Pfh)z^Yk2b@63$jqYEUx{c-fE{z`>*934=bOf$rPeIOk&1r!RQ0 zwCI`8Id|qLys^Aaq5e)re*Vy*gY$EiDQkzz9-eAjF7JWFn0VqV{2DgL58?5p?hu(? z-Y1iAIaQWOo|-t$!=cv9Zh!p$D5fim&Tv(_p? z=-N?!j1ZKskVe@Qu^`uxwYNoJa2P=lQh(^rwgd>IerY3D0xvEH`~kl?fa&e5F!6Uo zC8`N$1DFES*hbU*mdd^=?I2DJV$u=JuEc<%ySWI!a0gY*-rkEUJ{2Kde*@xwUV*ul z&MGcCt-|i6+SoGQ0t2PvU^b!-cfOD37ub8`TS1&3eESYwy#tSaV}(&+@T%u?3U{xD zMXiPX-wI}L;bnKRUP08McMm)RAts3MZ$N)7#0aJ##2vWx+({YM2I_BZqylR*4Ytmr z5!TsslyweOSX-#lI+tcx=hG7F0$OEV2y=T8t+6hqGptLf)w+~6SeMgT))jQVbroG| zT}?My*U;_OwJ^EY(LL4;^rUqo1pFd;&bk@q_7?i3bsN2EZKXG@F8Ymi2fbtIA9c0j zP7;_AH&lOc4HepA!i_gA+#Y&EzK!BJGw>C`ca}`VYcIliTnteh0ng6Y^KCkn+T=Uv zwIOfSs?CdQ{XV3D)tDQrX{(t?{&WptCi!}326?#xFP97ar*3s25IaOL)DEJ`Jji&) vutQXkcZh%TVe1R!JXn>p-~rwRDpI~D-^Vi-lGjS7$q(Sea5GANNQ3?#xu#wX literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONString.class b/bin/org/json/JSONString.class new file mode 100644 index 0000000000000000000000000000000000000000..f891964b4b2787fc4831fb2e9573a5546cbce652 GIT binary patch literal 156 zcmX^0Z`VEs1_omWPId++Mh4;hqICVN;`}^)uV8<_;F6-uymWR37Dfhvti-ZJ{hY+S zbbbG%tkmQZMh2dee1sxK1`!QSAA}-^R%=EEuHgLAqU2P!%$!t427ZJFJ&;;9Mg~R( YW}y8H42(caSQ*$rECzNU$;7|`0G7-qA^-pY literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONStringer.class b/bin/org/json/JSONStringer.class new file mode 100644 index 0000000000000000000000000000000000000000..5a1fefacb08b8b1f1dd3d537d838b6e7e7142966 GIT binary patch literal 604 zcmZ9K%TB^T6o&r+v`~s%E8Z1v0T!}wC&pk%T$l=r8jQ;V4GuzUO3~MG=T;LVi6%aP z4`n>lmIU0)oO9;OKmR#1Kfj;f0FH4eA;h5CPOs7**;eIJZ#Hz-;a1OdBt#gpb4NE0 zcTI<3@swNKJ!1$LOD%>--R_zaVhp*y@n}@IUGYVHUPcsg1q)b|5k^8pOQc-Xrm&Ay zg;Y}Gmf08&+op4EvT$>`2&VNO=u-vdwni?6?ZD$T1{z z*XZ0|84sRY343$s)R(N=W2a+YaM5LYcJfC;7X@+?rdI+&6w&l(l_)!*Dx+N~e<6B1 zfjoio=21ynWuk!^;y6c2P(F(^GL+HSkqdM*PZvhyoIH3_=}?Nb`U!5@CBd+q=L literal 0 HcmV?d00001 diff --git a/bin/org/json/JSONTokener.class b/bin/org/json/JSONTokener.class new file mode 100644 index 0000000000000000000000000000000000000000..895bb76fcf4e638d4daf5edca60e14bd4c9b7cbd GIT binary patch literal 6023 zcmai2d303O8UNkPBr_S_gvk(sFo_O9LNZARpsZn$M6f|ZfP^3*t&`*>3?wsQX2MdS zb>D4^RWvA@sIeMtsFF~lU>CdCT9?|2OKq#C?XjNIzuI$pT59_H?t9rtY;(?g_r9BV zzx#c^@AoZlUiNT~o9cI*wyWmvtZ4d7Xm$rnX z&85}#+s%fgLVClta6H_QG~)_tm4d^JHF36CAvF?hH1{YtTOv_Y!QB=&cSU0D3I4Z2 zAuVo(8)cJkwH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zv|6jKr$bnzDHYO2eJNaw zv9N2=U14C$C0pN-|9~dBy>NxGSeh8G%#&~^jyQA=W+}eQww-2V-DCaJE#{V(air>7 zwMVN~GxRyF9B+kI?qj%!^#2=Nl%o;TxM^Y;zp>v(x+AKQ3IHE~B=ln@t5%HK_t#Suw5qUV!}$h@X-DK2m*XN;sBfqT4#ThhZHCjJb54ys#W zIl47QS=128ivQQq_F}9|=s)2#Rdw55O|RJUqKt%;cIKo${X}2#F#|^>uMkIrUj@#J z^S<0m487oD04a`g4E|HY9L;V3=MjD-aR8%?I>>c`Cx?PGAGl6%r}zfxzhBaJxeu7n zZR5yOWH}vQeTMPbS2(5c9%m{u`CNV*)7zMRz|DDur~iGLc^)K`;-@jhah7AABFtf& zT~1&gQ#i}9fXi428q0M{@_}Ap{1E5!xWJaiiS{BcvB@dMUB(q+E;2%Zbk7!fc9lD$ z82o|>18D=3na@m-#1gLULH901x9|pIM0Z`#39K6-tWq4--EFK2tb6@oEwRcqwsM`! z-9QF6`4lcA%k??hLip~&S_r@htl0pdFg?l0D!V(m2Uhp&ejHZDz?gxR0G7gEOgw<~ EZ${yu-v9sr literal 0 HcmV?d00001 diff --git a/bin/org/json/XML.class b/bin/org/json/XML.class new file mode 100644 index 0000000000000000000000000000000000000000..d63989d629dbd084699e63f66e55da07b6a03b1d GIT binary patch literal 7594 zcma)B3wTu3wf@)1Wai9pLWT(eMiLx?Bq0xipr}a*1_+8KJPZ%PUiC1HNg$bt^RVEp zZME1-ecWEfs==z@BhmVbr~$>dR;;bnTWedd^{s8K_4aZ5xV6-||K4YknS^|w7rrxl zpS9Osd%f4%Cog^e*pmPjNTUaaz>38?>b53g(YmwST0L+H{9Emd?7D6{+EKS^^VUc> zDadPXTP-MV&8{r%wBvR-8HqOtT+ORjwR2d~yz(@G(Xxg=r>*5rD}VCWtZQlK=vuRG zm3nP&ZEinZU^a%kyP{pmCK9ilv!3fqV_PCV6rtFI$%3MBj%X?akd0L7+7jw!7Ec@h2tfMKdwO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#sh6s!v76N_e@OD{Jp>Z?^r4B1Qc&*-x`w21p_#|Vw5;?Ns@w0= zrw3i7L*gHj$p@uaF|spHN{h{X>9+^)L`~3_T^PW98Il(rO>&b%Mzf?&Z5S3#u{k$&rkb5bk<6vKtH<#9o4>Ef=8jpI&*cme zr9%f>0hK`XM3?eZnTVzQy@bK?O%%!%D3U9gGOj{Mu4c-(mMLR5{}yo_|Jv{!{&C=X zw8{-wBRA5E_n=d5L0oRd#j+Qd%07N+y$x5(?fgo52X2&pe)zkM-{bD$x3|0TtlZBM z`~ZF`gLsoA^Ih4`lKK!!=))|RkKl8mFUtWbWFSqIM`eaQ#@qHGsg%d%1bI*v$y0KM zJS}VF897^?mGk8Vew9BgF}Y55$V+mG{8%oRSL8~0Rj!qv$PMxf*(Yzv_k^d(FG=|= zc~ah%=j0u}z0IQh9*gn^azs8frprf0qx{O~kPmgl4zZ9h7BdmcnJ$351smtOt z8q7F?3f`yEyk?uMhB^l?aO$Ur9TM|eDJG0wP&jHy7tg{|`I_ccG>b%T3v_N&Xez}! zRkkQiCbL-jj0~w^oWeAY$w3*P&_8h61mlZom8F?A#}$by`dT$2Y#_~!h7~>oP{&eR z%-w0;@yCI)QY|2MTBYoxcae%(rA*#5uWX!T=mO?)LemJrmjfgfs&XL^+NuVTdIAh- F_&<}lwKV_$ literal 0 HcmV?d00001 diff --git a/bin/org/json/XMLTokener.class b/bin/org/json/XMLTokener.class new file mode 100644 index 0000000000000000000000000000000000000000..7bb49ada40f37f1f91108b7406684ee7cbc95bfd GIT binary patch literal 4797 zcmai2YjjlA75>gV?@TTxj)YedIz9>^5aWXeN**N%0l_>;0)&^`Om32a$;>cwgG5^u zMQat?N{cPnYP8l^r8Y(l_=489wxV|RkNwrPTD#gVm#cO4SFMUpzkTOsk`THY)|qqe zKKq=r_qV^j&%K=c{N*zMuE+2Ea4B4tNcC6jO()_N+nSp?6Z_1#nexMU znNjeWaVu&Kb79k7*JWhzw9)^J2IBi>)pVWpz+ z{;I5!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Fgr_ldc=KVrn zrPotqtCexiyK;Gtc6pIggRiT%P2ujym>CLTtxA-``o|7}T_Hk>UD)hFl8f2_ln|-w;8xeu)s@IsRs6q(YAjMUSgdLhR%`i5U&Rmg^;oGk@O%13 zRI4UzQq5>mE&K>=!)DcvZnYVEIJZ}ALtJ$usdi&X-GpJa2e+y|98&!_tOjtuisGnh zw4>B#zd{_#)%#=k6*;LGnVtAG-XNrlnDlZJx|xe5&M3s2L|zy?d=1%+-*6;QAH{Du z@)7bQtiDl3DxZbuO`PNHBXK=|ybKBvVEA|&&}D|vkGJHlBAAmhvN@@ilTPXSGR!Y$ a3sH5HLj^9MciKKO;Y@L@ye+u!&VK>SWCuq8 literal 0 HcmV?d00001 From ead617e901ef49d0420ac932b62f29dc14f449b8 Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Fri, 14 Aug 2015 14:53:17 +0200 Subject: [PATCH 5/9] gitignore --- bin/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 bin/.gitignore diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 000000000..cf1db2eed --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +/org/ From cd223af4ea0d21f820cc6249f618fa72ba776752 Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Sat, 15 Aug 2015 23:37:17 +0200 Subject: [PATCH 6/9] commit --- bin/org/json/CDL.class | Bin 4429 -> 4429 bytes bin/org/json/Cookie.class | Bin 3154 -> 3154 bytes bin/org/json/CookieList.class | Bin 1985 -> 1985 bytes bin/org/json/HTTP.class | Bin 2586 -> 2586 bytes bin/org/json/HTTPTokener.class | Bin 1106 -> 1106 bytes bin/org/json/JSONArray.class | Bin 12721 -> 15202 bytes bin/org/json/JSONException.class | Bin 754 -> 754 bytes bin/org/json/JSONML.class | Bin 6655 -> 6655 bytes bin/org/json/JSONObject$Null.class | Bin 793 -> 793 bytes bin/org/json/JSONObject.class | Bin 23171 -> 25877 bytes bin/org/json/JSONString.class | Bin 156 -> 156 bytes bin/org/json/JSONStringer.class | Bin 604 -> 604 bytes bin/org/json/JSONTokener.class | Bin 6023 -> 6023 bytes bin/org/json/JSONWriter.class | Bin 4124 -> 4124 bytes bin/org/json/Property.class | Bin 1747 -> 1747 bytes bin/org/json/XML.class | Bin 7594 -> 7594 bytes bin/org/json/XMLTokener.class | Bin 4797 -> 4797 bytes 17 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/org/json/CDL.class b/bin/org/json/CDL.class index ceeef9a18b69d7d4f272d4de8a407c4c07435e71..5587c47a5128536f38d8a3df6e757a8f53374b29 100644 GIT binary patch delta 17 ZcmX@BbXJMu)W2Q(7#J8#HgdQM0suth25JBR delta 17 ZcmX@BbXJMu)W2Q(7#J9gH*&ZN0sutc25A5Q diff --git a/bin/org/json/Cookie.class b/bin/org/json/Cookie.class index 77998662739122a4cebaeaf023b41144de062c90..d2dbe9ba6bcc6c0b335a541e93ee9731411b3f4c 100644 GIT binary patch delta 17 Zcmca4aY=&X)W2Q(7#J8#Hgb6J002Z?24DaH delta 17 Zcmca4aY=&X)W2Q(7#J9gH*$FK002Z-244UG diff --git a/bin/org/json/CookieList.class b/bin/org/json/CookieList.class index 80c3d23e4931e654ac35a0f25ea391a976388967..40908aa9d5a66bc97176e88821042539caf0182a 100644 GIT binary patch delta 17 ZcmX@ee~_Q!)W2Q(7#J8#HgfD_2LM6{29^K- delta 17 ZcmX@ee~_Q!)W2Q(7#J9gH*)M`2LM6?29*E+ diff --git a/bin/org/json/HTTP.class b/bin/org/json/HTTP.class index 27dbc187495e0b6bf28b09f46e1701ada6b16884..b2c994160172d325a74de6394e2da2b652221002 100644 GIT binary patch delta 17 ZcmbOwGE0Qx)W2Q(7#J8#HgX7Y0RTL61+D-9 delta 17 ZcmbOwGE0Qx)W2Q(7#J9gH*yGZ0RTL11+4%8 diff --git a/bin/org/json/HTTPTokener.class b/bin/org/json/HTTPTokener.class index f9e5bcd09a253c8ba3dc259762e1c97abbb87c07..1498ff3119cfeaed71968f51b53d40a861307e15 100644 GIT binary patch delta 17 Zcmcb_afyTD)W2Q(7#J8#Hgb5e002UD1~>o! delta 17 Zcmcb_afyTD)W2Q(7#J9gH*$Ef002U81~&iz diff --git a/bin/org/json/JSONArray.class b/bin/org/json/JSONArray.class index c6c9202b6d405bc59a566108a66329faf80b14e5..dabee8e882895ac0c101ee8add4ace264f845781 100644 GIT binary patch delta 6675 zcmb_g33yfInSQ@}PI8l*lMs^JEM&V0WV^W`ge4$hQ4B~TMg;@|Qi$;qFWxL>p@PdT zE!M3I@V6>fQS6LNRRk1oqKt|i#|10aD(>P^>!`KX>eQKzD1HBP4@n3-&NF@H$&-7| z`TuWy|8F~IPwRVYJqNyd_)!3p<()mAgNYG$Td;R-M_;>OT={}EEo)nzWZr!Z9Stszv)*C9g?SbI87GA(}0(WPZtug^G%5o$% zE;_sE>m_kSPrvy}`C%w}qSWs=!-*oKcH+B5*O1HSY>W-w*kpvtTI8*L4Mb9)$3Yg?F)4 zkW4fdh1$Eq!KRk>U;=(Gknt4R8g5y?o>mQWJcf|KSlbd7qz>D0fXZ~1B7=Cw@E{8T zapRAIlp!x;XQ1`Z3ANP+TSM(yY|fy!?Jd0*R}XEG|IdO9n}5WX2L^8P;8V;=z!!qz z$O>O;XJ7at+xgbcji{MaBO$Qn9n;!IxU+|4`>}l}nD- z=@3(AJe}o}z@(QA9z2Y1EF2}`NC&=jmKb7ktE;8ECrCDRX=0YD z_f)zhL0#&pcZsF?JylaB)soSYCP)l-cC-x%Y4k{jWV*$B9O?^5V@Z}|tK6gsMuOz3 z)k(z#3|1+$5D|EAEk=2eirX1sGS-rDQlg$u>Z+-m zM?*LqY->a`k0qe9Q|F*Qa#oNEK_vBdwvl3V3ARX%!V;T@K2 z!$t;PPpCZN90lUMA~=q|BVO_gbLj#3ja!~Q zR&qj})l0iW3{5TK2U_PrOP-hCsz=is<9}z#i}I36$ru;^vUczlH7z4wUQz$Ig940QnD6CM6yiYY;%%>2Nu?86kBOmQ3LMQy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S?>Wiva#VS@S70w`Ku&7cox{ru4 za!hfOXKbHjq&7sr?_tReQOR*E_Z=c=yxdY;oM(8L-QF^Q_n1E3W06PV%XuF9Ic=mxBLp@Xwri*CWk2u2t z`D|&r9yY@OYvc8>8FbGl%hRRabR1~R>!IR4Jp(C!jrAN;dSX=kB2x9TyEHZJSYwKc z(|PcLLLacuhY=yYMk$i`Tag*uUoDZ($8l%+dW@FP9m3}bep zC6?<=gWOS;T&}?5A{~Gj+DQF3P`~M-44Np1OALdX-_E=Q7k55xR{Lbq8<~)6n5rv%o0;^jhKd3aV6&Q*@faN-KLQ|%7912^8?Nz znx*G^99p8C(u)SHn0u=NjdGv2ii z1&uv)-DELxJDj1QH%!+DykV>fQ}guO1bMm1_ij6PI@C{EDl8nCIY&@JHSt^Bo^y5;EMY296lfC2qOJgTeb zOyPA_7IoB0D`+J<3iT_5_r5dBk{Zl;41(k_N=2aD6pWu4rd3XpaVwlbm862lloanC zx}8&Xrqi?;4c?S%%gyrS@c8sqDLi%sRuIO@%6#@ zS?buXO5;9w8k3DZbocYhF5Hf_w2?_sLs>h|*bu*kU{ssvVd9>KQ|v{m*vC1#7g^#N zgv7I)r_b}n+m8|A0AIY{bH2WSN#aFJ6$f#(IK=sS5Z8;txRK9!7KlHhOT3I_;t0CM zt5_qBVy$=$>%=j6pwd+vB?wZFgrZN2aI!j+3uE2n9424J_Q|`LY=Gk5nUnyF C#1G>D delta 47 zcmbQqHj|Cx)W2Q(7#J9gH*!2-WK5g2V6r-s3uEo%9424Jw#mDgY=Gk5nUnyF COb^`v diff --git a/bin/org/json/JSONObject.class b/bin/org/json/JSONObject.class index e15f330cce6e1abd31eacb6aefc4b3c1ce029d54..f95116215331097a2258fd4ee4df07737fa8f1cb 100644 GIT binary patch delta 12015 zcmb_?33!y%)&Dv7-6oR>37Kq@b&{~oBtRf+S=e_IHc6hzhu%wXUtZZLQX|mD(yOD9ZnL-|0$~yQuHz>dJh#Z%b}f&$A|05)+^ZC!m}bY(+8 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fY&Bwfri^kJ3E92}%&Mf}Y6Xz+EjXE~KjFQ=S36>XlY`l-u*4bDELBVjfq{(lhu zC_{bZLqI5Y3eOeWF9OcI1-LqXTa_@3Qm=y0o;DTNEJu$D!FC67NyN}hDO*3 z%Uy{WcNN;XtC8fcMY?-7^4xRK!#x)z?mCpZ=V7qB9+TYjG1I+(uIxh0cQ;_E`v)v{ zFTyJK5}fT`iuLX$T;y)XmF^a7b1%d7?&Y}Iy#f!oS5hM{#G~$2^ki4#8TVSeFw$+t zD{c#3b+5zg?)9Dwmb32<{PU#K_-Cur;MxgoTSCAwp6uu(BXdp3Y~Im diff --git a/bin/org/json/JSONString.class b/bin/org/json/JSONString.class index f891964b4b2787fc4831fb2e9573a5546cbce652..41b164a954a7aefb834e79005f733289606a1d80 100644 GIT binary patch delta 16 YcmbQkIERtr)W2Q(7#J8#CUQ&x05uN<y05uB*;{X5v diff --git a/bin/org/json/JSONStringer.class b/bin/org/json/JSONStringer.class index 5a1fefacb08b8b1f1dd3d537d838b6e7e7142966..66c7db3c69cdc0ff1f2b025371be82d7c69e35a7 100644 GIT binary patch delta 17 Zcmcb^a)*WE)W2Q(7#J8#Hgbe80RTf!2220| delta 17 Zcmcb^a)*WE)W2Q(7#J9gH*$n90RTfv21@_{ diff --git a/bin/org/json/JSONTokener.class b/bin/org/json/JSONTokener.class index 895bb76fcf4e638d4daf5edca60e14bd4c9b7cbd..02f30b1fd557e675f9f0a43208e9704b1fb74d02 100644 GIT binary patch delta 17 YcmZqIZ`bEI^>5cc1_lO`jU4sj06ruJH~;_u delta 17 YcmZqIZ`bEI^>5cc1_lP>jU4sj06rfEHvj+t diff --git a/bin/org/json/JSONWriter.class b/bin/org/json/JSONWriter.class index 70d8c6ff51e5f6235bb5a92948453fed7f8c0d8f..71e06fd6f8431e3f45034ffdc9afd55423702372 100644 GIT binary patch delta 17 ZcmbQEFh_yo)W2Q(7#J8#Hgbpv002HE1=0Wj delta 17 ZcmbQEFh_yo)W2Q(7#J9gH*$yw002H91*7)W2Q(7#J8#HgYVI1pq`i2EPCR delta 17 ZcmZ2wy~>*7)W2Q(7#J9gH*zeJ1pq`d2EG6Q diff --git a/bin/org/json/XMLTokener.class b/bin/org/json/XMLTokener.class index 7bb49ada40f37f1f91108b7406684ee7cbc95bfd..4a5e806944c5481a3adc1cc057f598572918827c 100644 GIT binary patch delta 17 Zcmdn1x>uFs)W2Q(7#J8#Hgaqg0surG2EhOT delta 17 Zcmdn1x>uFs)W2Q(7#J9gH*#zh0surB2EYIS From c25312715bfb466d46bf1c4ff3adfa66f4e10d45 Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Sun, 16 Aug 2015 01:58:25 +0200 Subject: [PATCH 7/9] Added safe getter methods to JSONObject which return a default value passed if the key is not found or any errors occur. --- bin/org/json/JSONObject.class | Bin 25877 -> 26910 bytes src/org/json/JSONObject.java | 3770 +++++++++++++++++---------------- 2 files changed, 1923 insertions(+), 1847 deletions(-) diff --git a/bin/org/json/JSONObject.class b/bin/org/json/JSONObject.class index f95116215331097a2258fd4ee4df07737fa8f1cb..c07e46f2e601c0e43979aa6b1f65e1c6a949642c 100644 GIT binary patch delta 10150 zcma)Bd0drM`hU)Ox69>4w##x^FRO4bC~l}A;=TfDmI^M2ib{eYsA*-l#WvflV+&-C z)uct5Sj`o)TpOFLMy+hoU(3wY*i=?Cqf?f}?|a^R0c+CF@CWC-XL-)^e4ph!&$$mA zW*gsP_QOBFxQB@PD}8s^S$JrVh1JVO)YsQmS1p-RwV+z`h)e7{!(=m=i;=RZs>x1_ z%{E!F{5I!TFQ{5xyKHJz?ec0ytb!4*Udbr7M0~`fS)m9DFIE>Ya)>_R4x61-)6+Iq zBSIol#oF-9sBn2y&BF0ZmQ^pTZj`4n8YcFKM~ZLbdWfOnHt|DLOo%+N-emLGd`8hC zFFaa28(z$oiLb+*dXpr0H3;T(5*t-Lucof5_Ls!+?Ce^TEoF_8!nbkJVqiq3_Xb8` zS5>X3>Rns4WMS{J<#ltb8|}=?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o(GJbu+*ur$|d?unPC22}d^znh|oPbNpuO$k26 zl~8ih9KTA3OtQNwr{(Y?$(7KG4^m1@CO>KLxBY?HEHpUuGIawL|C=ZnUPdhaQf#DC zlwezlH93>5N*MT*>nyQ5*`cgpZB)TZ%e$^V)8D?v(rwL#XH&whNFOPC>;x~ZTcTecIW1Cbm5b-(qT&!&3LKS-n-4thu}sM6Ars0{ zrB*mpG9uquLa>(7QJ*P=H5yn$^IoaPGRq*h$7h#TPL)TCeaUB2Qv^BI${@Oe96%Sk z!sh_8D%Bda%+jQ}J2dG8+zz!K{#KueTG0|xHXCJ%X37sYCABi0mLhu(A5xRU7xK%< z>p=g2O!`BF=qC}Qe?;E*W3<;lK@a^?4Af5{NBZDgFR{T+Mn({OmiBx<9yKEGR z+Cqm^J@IOxt8z;NiCHuF7E&v6u7r+TALDF`oWR#grYf8JnVRhDXHky7gf11wr$;4Jdjhj)?%XOfdP$1MO+8nKaacAT zoiTNaQ~WtSsaN9xyF3tP)G4tZs_vWA;KnFyJ{0n_Q%so=QAx#u1Poj%kx;YI(l65H zAC8jdfb`}hU*D)Xl$THw$)qAC0DeXbv@}{G%m_lX5sV}w1Z|B_WEx?}GQ!c@h{Pzv zfjlD$lZ|LhHJq4j#9*!wiv@-Yi;Z~PVI-pSDkBLSjbuDvq~Jj#6%QG$@RZ?39RZy% z(ot_@;8mjy-ZI+Z1EW1o8XfSl(NSc~jEMJ{H*vB_e~70({Za6~;-Z4QaAtDPc+w~X zvq`6NNo8#Km|E@iRG6vFb#_ZKkyDgD`cnKpus5JLY_jm@Tf|E<)7@JrWta6DxI!$T Z-$W&e#$b}|Tuf1tbw5f*nUaF2{{z4i3$*|M diff --git a/src/org/json/JSONObject.java b/src/org/json/JSONObject.java index ed1159e9c..6b95d59df 100755 --- a/src/org/json/JSONObject.java +++ b/src/org/json/JSONObject.java @@ -1,1847 +1,1923 @@ -package org.json; - -/* - Copyright (c) 2002 JSON.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - The Software shall be used for Good, not Evil. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - */ - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.math.*; -import java.util.Collection; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.Map.Entry; -import java.util.ResourceBundle; -import java.util.Set; - -/** - * A JSONObject is an unordered collection of name/value pairs. Its external - * form is a string wrapped in curly braces with colons between the names and - * values, and commas between the values and names. The internal form is an - * object having get and opt methods for accessing - * the values by name, and put methods for adding or replacing - * values by name. The values can be any of these types: Boolean, - * JSONArray, JSONObject, Number, - * String, or the JSONObject.NULL object. A - * JSONObject constructor can be used to convert an external form JSON text - * into an internal form whose values can be retrieved with the - * get and opt methods, or to convert values into a - * JSON text using the put and toString methods. A - * get method returns a value if one can be found, and throws an - * exception if one cannot be found. An opt method returns a - * default value instead of throwing an exception, and so is useful for - * obtaining optional values. - *

- * The generic get() and opt() methods return an - * object, which you can cast or query for type. There are also typed - * get and opt methods that do type checking and type - * coercion for you. The opt methods differ from the get methods in that they - * do not throw. Instead, they return a specified value, such as null. - *

- * The put methods add or replace values in an object. For - * example, - * - *

- * myString = new JSONObject()
- *         .put("JSON", "Hello, World!").toString();
- * 
- * - * produces the string {"JSON": "Hello, World"}. - *

- * The texts produced by the toString methods strictly conform to - * the JSON syntax rules. The constructors are more forgiving in the texts they - * will accept: - *

    - *
  • An extra , (comma) may appear just - * before the closing brace.
  • - *
  • Strings may be quoted with ' (single - * quote).
  • - *
  • Strings do not need to be quoted at all if they do not begin with a - * quote or single quote, and if they do not contain leading or trailing - * spaces, and if they do not contain any of these characters: - * { } [ ] / \ : , # and if they do not look like numbers and - * if they are not the reserved words true, false, - * or null.
  • - *
- * - * @author JSON.org - * @version 2015-07-22 - */ -public class JSONObject { - /** - * JSONObject.NULL is equivalent to the value that JavaScript calls null, - * whilst Java's null is equivalent to the value that JavaScript calls - * undefined. - */ - private static final class Null { - - /** - * There is only intended to be a single instance of the NULL object, - * so the clone method returns itself. - * - * @return NULL. - */ - @Override - protected final Object clone() { - return this; - } - - /** - * A Null object is equal to the null value and to itself. - * - * @param object - * An object to test for nullness. - * @return true if the object parameter is the JSONObject.NULL object or - * null. - */ - @Override - public boolean equals(Object object) { - return object == null || object == this; - } - - /** - * Get the "null" string value. - * - * @return The string "null". - */ - public String toString() { - return "null"; - } - } - - /** - * The map where the JSONObject's properties are kept. - */ - private final Map map; - - /** - * It is sometimes more convenient and less ambiguous to have a - * NULL object than to use Java's null value. - * JSONObject.NULL.equals(null) returns true. - * JSONObject.NULL.toString() returns "null". - */ - public static final Object NULL = new Null(); - - /** - * Construct an empty JSONObject. - */ - public JSONObject() { - this.map = new HashMap(); - } - - /** - * Construct a JSONObject from a subset of another JSONObject. An array of - * strings is used to identify the keys that should be copied. Missing keys - * are ignored. - * - * @param jo - * A JSONObject. - * @param names - * An array of strings. - * @throws JSONException - * @exception JSONException - * If a value is a non-finite number or if a name is - * duplicated. - */ - public JSONObject(JSONObject jo, String[] names) { - this(); - for (int i = 0; i < names.length; i += 1) { - try { - this.putOnce(names[i], jo.opt(names[i])); - } catch (Exception ignore) { - } - } - } - - /** - * Construct a JSONObject from a JSONTokener. - * - * @param x - * A JSONTokener object containing the source string. - * @throws JSONException - * If there is a syntax error in the source string or a - * duplicated key. - */ - public JSONObject(JSONTokener x) throws JSONException { - this(); - char c; - String key; - - if (x.nextClean() != '{') { - throw x.syntaxError("A JSONObject text must begin with '{'"); - } - for (;;) { - c = x.nextClean(); - switch (c) { - case 0: - throw x.syntaxError("A JSONObject text must end with '}'"); - case '}': - return; - default: - x.back(); - key = x.nextValue().toString(); - } - -// The key is followed by ':'. - - c = x.nextClean(); - if (c != ':') { - throw x.syntaxError("Expected a ':' after a key"); - } - this.putOnce(key, x.nextValue()); - -// Pairs are separated by ','. - - switch (x.nextClean()) { - case ';': - case ',': - if (x.nextClean() == '}') { - return; - } - x.back(); - break; - case '}': - return; - default: - throw x.syntaxError("Expected a ',' or '}'"); - } - } - } - - /** - * Construct a JSONObject from a Map. - * - * @param map - * A map object that can be used to initialize the contents of - * the JSONObject. - * @throws JSONException - */ - public JSONObject(Map map) { - this.map = new HashMap(); - if (map != null) { - Iterator> i = map.entrySet().iterator(); - while (i.hasNext()) { - Entry entry = i.next(); - Object value = entry.getValue(); - if (value != null) { - this.map.put(entry.getKey(), wrap(value)); - } - } - } - } - - /** - * Construct a JSONObject from an Object using bean getters. It reflects on - * all of the public methods of the object. For each of the methods with no - * parameters and a name starting with "get" or - * "is" followed by an uppercase letter, the method is invoked, - * and a key and the value returned from the getter method are put into the - * new JSONObject. - * - * The key is formed by removing the "get" or "is" - * prefix. If the second remaining character is not upper case, then the - * first character is converted to lower case. - * - * For example, if an object has a method named "getName", and - * if the result of calling object.getName() is - * "Larry Fine", then the JSONObject will contain - * "name": "Larry Fine". - * - * @param bean - * An object that has getter methods that should be used to make - * a JSONObject. - */ - public JSONObject(Object bean) { - this(); - this.populateMap(bean); - } - - /** - * Construct a JSONObject from an Object, using reflection to find the - * public members. The resulting JSONObject's keys will be the strings from - * the names array, and the values will be the field values associated with - * those keys in the object. If a key is not found or not visible, then it - * will not be copied into the new JSONObject. - * - * @param object - * An object that has fields that should be used to make a - * JSONObject. - * @param names - * An array of strings, the names of the fields to be obtained - * from the object. - */ - public JSONObject(Object object, String names[]) { - this(); - Class c = object.getClass(); - for (int i = 0; i < names.length; i += 1) { - String name = names[i]; - try { - this.putOpt(name, c.getField(name).get(object)); - } catch (Exception ignore) { - } - } - } - - /** - * Construct a JSONObject from a source JSON text string. This is the most - * commonly used JSONObject constructor. - * - * @param source - * A string beginning with { (left - * brace) and ending with } - *  (right brace). - * @exception JSONException - * If there is a syntax error in the source string or a - * duplicated key. - */ - public JSONObject(String source) throws JSONException { - this(new JSONTokener(source)); - } - - /** - * Construct a JSONObject from a ResourceBundle. - * - * @param baseName - * The ResourceBundle base name. - * @param locale - * The Locale to load the ResourceBundle for. - * @throws JSONException - * If any JSONExceptions are detected. - */ - public JSONObject(String baseName, Locale locale) throws JSONException { - this(); - ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, - Thread.currentThread().getContextClassLoader()); - -// Iterate through the keys in the bundle. - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - Object key = keys.nextElement(); - if (key != null) { - -// Go through the path, ensuring that there is a nested JSONObject for each -// segment except the last. Add the value using the last segment's name into -// the deepest nested JSONObject. - - String[] path = ((String) key).split("\\."); - int last = path.length - 1; - JSONObject target = this; - for (int i = 0; i < last; i += 1) { - String segment = path[i]; - JSONObject nextTarget = target.optJSONObject(segment); - if (nextTarget == null) { - nextTarget = new JSONObject(); - target.put(segment, nextTarget); - } - target = nextTarget; - } - target.put(path[last], bundle.getString((String) key)); - } - } - } - - /** - * Accumulate values under a key. It is similar to the put method except - * that if there is already an object stored under the key then a JSONArray - * is stored under the key to hold all of the accumulated values. If there - * is already a JSONArray, then the new value is appended to it. In - * contrast, the put method replaces the previous value. - * - * If only one value is accumulated that is not a JSONArray, then the result - * will be the same as using put. But if multiple values are accumulated, - * then the result will be like append. - * - * @param key - * A key string. - * @param value - * An object to be accumulated under the key. - * @return this. - * @throws JSONException - * If the value is an invalid number or if the key is null. - */ - public JSONObject accumulate(String key, Object value) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, - value instanceof JSONArray ? new JSONArray().put(value) - : value); - } else if (object instanceof JSONArray) { - ((JSONArray) object).put(value); - } else { - this.put(key, new JSONArray().put(object).put(value)); - } - return this; - } - - /** - * Append values to the array under a key. If the key does not exist in the - * JSONObject, then the key is put in the JSONObject with its value being a - * JSONArray containing the value parameter. If the key was already - * associated with a JSONArray, then the value parameter is appended to it. - * - * @param key - * A key string. - * @param value - * An object to be accumulated under the key. - * @return this. - * @throws JSONException - * If the key is null or if the current value associated with - * the key is not a JSONArray. - */ - public JSONObject append(String key, Object value) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, new JSONArray().put(value)); - } else if (object instanceof JSONArray) { - this.put(key, ((JSONArray) object).put(value)); - } else { - throw new JSONException("JSONObject[" + key - + "] is not a JSONArray."); - } - return this; - } - - /** - * Produce a string from a double. The string "null" will be returned if the - * number is not finite. - * - * @param d - * A double. - * @return A String. - */ - public static String doubleToString(double d) { - if (Double.isInfinite(d) || Double.isNaN(d)) { - return "null"; - } - -// Shave off trailing zeros and decimal point, if possible. - - String string = Double.toString(d); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 - && string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - /** - * Get the value object associated with a key. - * - * @param key - * A key string. - * @return The object associated with the key. - * @throws JSONException - * if the key is not found. - */ - public Object get(String key) throws JSONException { - if (key == null) { - throw new JSONException("Null key."); - } - Object object = this.opt(key); - if (object == null) { - throw new JSONException("JSONObject[" + quote(key) + "] not found."); - } - return object; - } - - /** - * Get the enum value associated with a key. - * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. - * @return The enum value associated with the key - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an enum. - */ - public > E getEnum(Class clazz, String key) throws JSONException { - E val = optEnum(clazz, key); - if(val==null) { - // JSONException should really take a throwable argument. - // If it did, I would re-implement this with the Enum.valueOf - // method and place any thrown exception in the JSONException - throw new JSONException("JSONObject[" + quote(key) - + "] is not an enum of type " + quote(clazz.getSimpleName()) - + "."); - } - return val; - } - - /** - * Get the boolean value associated with a key. - * - * @param key - * A key string. - * @return The truth. - * @throws JSONException - * if the value is not a Boolean or the String "true" or - * "false". - */ - public boolean getBoolean(String key) throws JSONException { - Object object = this.get(key); - if (object.equals(Boolean.FALSE) - || (object instanceof String && ((String) object) - .equalsIgnoreCase("false"))) { - return false; - } else if (object.equals(Boolean.TRUE) - || (object instanceof String && ((String) object) - .equalsIgnoreCase("true"))) { - return true; - } - throw new JSONException("JSONObject[" + quote(key) - + "] is not a Boolean."); - } - - /** - * Get the BigInteger value associated with a key. - * - * @param key - * A key string. - * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value cannot - * be converted to BigInteger. - */ - public BigInteger getBigInteger(String key) throws JSONException { - Object object = this.get(key); - try { - return new BigInteger(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) - + "] could not be converted to BigInteger."); - } - } - - /** - * Get the BigDecimal value associated with a key. - * - * @param key - * A key string. - * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value - * cannot be converted to BigDecimal. - */ - public BigDecimal getBigDecimal(String key) throws JSONException { - Object object = this.get(key); - try { - return new BigDecimal(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) - + "] could not be converted to BigDecimal."); - } - } - - /** - * Get the double value associated with a key. - * - * @param key - * A key string. - * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public double getDouble(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).doubleValue() - : Double.parseDouble((String) object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) - + "] is not a number."); - } - } - - /** - * Get the int value associated with a key. - * - * @param key - * A key string. - * @return The integer value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an integer. - */ - public int getInt(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).intValue() - : Integer.parseInt((String) object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) - + "] is not an int."); - } - } - - /** - * Get the JSONArray value associated with a key. - * - * @param key - * A key string. - * @return A JSONArray which is the value. - * @throws JSONException - * if the key is not found or if the value is not a JSONArray. - */ - public JSONArray getJSONArray(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONArray) { - return (JSONArray) object; - } - throw new JSONException("JSONObject[" + quote(key) - + "] is not a JSONArray."); - } - - /** - * Get the JSONObject value associated with a key. - * - * @param key - * A key string. - * @return A JSONObject which is the value. - * @throws JSONException - * if the key is not found or if the value is not a JSONObject. - */ - public JSONObject getJSONObject(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONObject) { - return (JSONObject) object; - } - throw new JSONException("JSONObject[" + quote(key) - + "] is not a JSONObject."); - } - - /** - * Get the long value associated with a key. - * - * @param key - * A key string. - * @return The long value. - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to a long. - */ - public long getLong(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).longValue() - : Long.parseLong((String) object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) - + "] is not a long."); - } - } - - /** - * Get an array of field names from a JSONObject. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(JSONObject jo) { - int length = jo.length(); - if (length == 0) { - return null; - } - Iterator iterator = jo.keys(); - String[] names = new String[length]; - int i = 0; - while (iterator.hasNext()) { - names[i] = iterator.next(); - i += 1; - } - return names; - } - - /** - * Get an array of field names from an Object. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(Object object) { - if (object == null) { - return null; - } - Class klass = object.getClass(); - Field[] fields = klass.getFields(); - int length = fields.length; - if (length == 0) { - return null; - } - String[] names = new String[length]; - for (int i = 0; i < length; i += 1) { - names[i] = fields[i].getName(); - } - return names; - } - - /** - * Get the string associated with a key. - * - * @param key - * A key string. - * @return A string which is the value. - * @throws JSONException - * if there is no string value for the key. - */ - public String getString(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof String) { - return (String) object; - } - throw new JSONException("JSONObject[" + quote(key) + "] not a string."); - } - - /** - * Determine if the JSONObject contains a specific key. - * - * @param key - * A key string. - * @return true if the key exists in the JSONObject. - */ - public boolean has(String key) { - return this.map.containsKey(key); - } - - /** - * Increment a property of a JSONObject. If there is no such property, - * create one with a value of 1. If there is such a property, and if it is - * an Integer, Long, Double, or Float, then add one to it. - * - * @param key - * A key string. - * @return this. - * @throws JSONException - * If there is already a property with this name that is not an - * Integer, Long, Double, or Float. - */ - public JSONObject increment(String key) throws JSONException { - Object value = this.opt(key); - if (value == null) { - this.put(key, 1); - } else if (value instanceof BigInteger) { - this.put(key, ((BigInteger)value).add(BigInteger.ONE)); - } else if (value instanceof BigDecimal) { - this.put(key, ((BigDecimal)value).add(BigDecimal.ONE)); - } else if (value instanceof Integer) { - this.put(key, (Integer) value + 1); - } else if (value instanceof Long) { - this.put(key, (Long) value + 1); - } else if (value instanceof Double) { - this.put(key, (Double) value + 1); - } else if (value instanceof Float) { - this.put(key, (Float) value + 1); - } else { - throw new JSONException("Unable to increment [" + quote(key) + "]."); - } - return this; - } - - /** - * Determine if the value associated with the key is null or if there is no - * value. - * - * @param key - * A key string. - * @return true if there is no value associated with the key or if the value - * is the JSONObject.NULL object. - */ - public boolean isNull(String key) { - return JSONObject.NULL.equals(this.opt(key)); - } - - /** - * Get an enumeration of the keys of the JSONObject. - * - * @return An iterator of the keys. - */ - public Iterator keys() { - return this.keySet().iterator(); - } - - /** - * Get a set of keys of the JSONObject. - * - * @return A keySet. - */ - public Set keySet() { - return this.map.keySet(); - } - - /** - * Get the number of keys stored in the JSONObject. - * - * @return The number of keys in the JSONObject. - */ - public int length() { - return this.map.size(); - } - - /** - * Produce a JSONArray containing the names of the elements of this - * JSONObject. - * - * @return A JSONArray containing the key strings, or null if the JSONObject - * is empty. - */ - public JSONArray names() { - JSONArray ja = new JSONArray(); - Iterator keys = this.keys(); - while (keys.hasNext()) { - ja.put(keys.next()); - } - return ja.length() == 0 ? null : ja; - } - - /** - * Produce a string from a Number. - * - * @param number - * A Number - * @return A String. - * @throws JSONException - * If n is a non-finite number. - */ - public static String numberToString(Number number) throws JSONException { - if (number == null) { - throw new JSONException("Null pointer"); - } - testValidity(number); - -// Shave off trailing zeros and decimal point, if possible. - - String string = number.toString(); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 - && string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - /** - * Get an optional value associated with a key. - * - * @param key - * A key string. - * @return An object which is the value, or null if there is no value. - */ - public Object opt(String key) { - return key == null ? null : this.map.get(key); - } - - /** - * Get the enum value associated with a key. - * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. - * @return The enum value associated with the key or null if not found - */ - public > E optEnum(Class clazz, String key) { - return this.optEnum(clazz, key, null); - } - - /** - * Get the enum value associated with a key. - * - * @param clazz - * The type of enum to retrieve. - * @param key - * A key string. - * @param defaultValue - * The default in case the value is not found - * @return The enum value associated with the key or defaultValue - * if the value is not found or cannot be assigned to clazz - */ - public > E optEnum(Class clazz, String key, E defaultValue) { - try { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (clazz.isAssignableFrom(val.getClass())) { - // we just checked it! - @SuppressWarnings("unchecked") - E myE = (E) val; - return myE; - } - return Enum.valueOf(clazz, val.toString()); - } catch (IllegalArgumentException | NullPointerException e) { - return defaultValue; - } - } - - /** - * Get an optional boolean associated with a key. It returns false if there - * is no such key, or if the value is not Boolean.TRUE or the String "true". - * - * @param key - * A key string. - * @return The truth. - */ - public boolean optBoolean(String key) { - return this.optBoolean(key, false); - } - - /** - * Get an optional boolean associated with a key. It returns the - * defaultValue if there is no such key, or if it is not a Boolean or the - * String "true" or "false" (case insensitive). - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return The truth. - */ - public boolean optBoolean(String key, boolean defaultValue) { - try { - return this.getBoolean(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional double associated with a key, or NaN if there is no such - * key or if its value is not a number. If the value is a string, an attempt - * will be made to evaluate it as a number. - * - * @param key - * A string which is the key. - * @return An object which is the value. - */ - public double optDouble(String key) { - return this.optDouble(key, Double.NaN); - } - - /** - * Get an optional BigInteger associated with a key, or the defaultValue if - * there is no such key or if its value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public BigInteger optBigInteger(String key, BigInteger defaultValue) { - try { - return this.getBigInteger(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional BigDecimal associated with a key, or the defaultValue if - * there is no such key or if its value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { - try { - return this.getBigDecimal(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional double associated with a key, or the defaultValue if - * there is no such key or if its value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public double optDouble(String key, double defaultValue) { - try { - return this.getDouble(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional int value associated with a key, or zero if there is no - * such key or if the value is not a number. If the value is a string, an - * attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @return An object which is the value. - */ - public int optInt(String key) { - return this.optInt(key, 0); - } - - /** - * Get an optional int value associated with a key, or the default if there - * is no such key or if the value is not a number. If the value is a string, - * an attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public int optInt(String key, int defaultValue) { - try { - return this.getInt(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional JSONArray associated with a key. It returns null if there - * is no such key, or if its value is not a JSONArray. - * - * @param key - * A key string. - * @return A JSONArray which is the value. - */ - public JSONArray optJSONArray(String key) { - Object o = this.opt(key); - return o instanceof JSONArray ? (JSONArray) o : null; - } - - /** - * Get an optional JSONObject associated with a key. It returns null if - * there is no such key, or if its value is not a JSONObject. - * - * @param key - * A key string. - * @return A JSONObject which is the value. - */ - public JSONObject optJSONObject(String key) { - Object object = this.opt(key); - return object instanceof JSONObject ? (JSONObject) object : null; - } - - /** - * Get an optional long value associated with a key, or zero if there is no - * such key or if the value is not a number. If the value is a string, an - * attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @return An object which is the value. - */ - public long optLong(String key) { - return this.optLong(key, 0); - } - - /** - * Get an optional long value associated with a key, or the default if there - * is no such key or if the value is not a number. If the value is a string, - * an attempt will be made to evaluate it as a number. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public long optLong(String key, long defaultValue) { - try { - return this.getLong(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional string associated with a key. It returns an empty string - * if there is no such key. If the value is not a string and is not null, - * then it is converted to a string. - * - * @param key - * A key string. - * @return A string which is the value. - */ - public String optString(String key) { - return this.optString(key, ""); - } - - /** - * Get an optional string associated with a key. It returns the defaultValue - * if there is no such key. - * - * @param key - * A key string. - * @param defaultValue - * The default. - * @return A string which is the value. - */ - public String optString(String key, String defaultValue) { - Object object = this.opt(key); - return NULL.equals(object) ? defaultValue : object.toString(); - } - - private void populateMap(Object bean) { - Class klass = bean.getClass(); - -// If klass is a System class then set includeSuperClass to false. - - boolean includeSuperClass = klass.getClassLoader() != null; - - Method[] methods = includeSuperClass ? klass.getMethods() : klass - .getDeclaredMethods(); - for (int i = 0; i < methods.length; i += 1) { - try { - Method method = methods[i]; - if (Modifier.isPublic(method.getModifiers())) { - String name = method.getName(); - String key = ""; - if (name.startsWith("get")) { - if ("getClass".equals(name) - || "getDeclaringClass".equals(name)) { - key = ""; - } else { - key = name.substring(3); - } - } else if (name.startsWith("is")) { - key = name.substring(2); - } - if (key.length() > 0 - && Character.isUpperCase(key.charAt(0)) - && method.getParameterTypes().length == 0) { - if (key.length() == 1) { - key = key.toLowerCase(); - } else if (!Character.isUpperCase(key.charAt(1))) { - key = key.substring(0, 1).toLowerCase() - + key.substring(1); - } - - Object result = method.invoke(bean, (Object[]) null); - if (result != null) { - this.map.put(key, wrap(result)); - } - } - } - } catch (Exception ignore) { - } - } - } - - /** - * Put a key/boolean pair in the JSONObject. - * - * @param key - * A key string. - * @param value - * A boolean which is the value. - * @return this. - * @throws JSONException - * If the key is null. - */ - public JSONObject put(String key, boolean value) throws JSONException { - this.put(key, value ? Boolean.TRUE : Boolean.FALSE); - return this; - } - - /** - * Put a key/value pair in the JSONObject, where the value will be a - * JSONArray which is produced from a Collection. - * - * @param key - * A key string. - * @param value - * A Collection value. - * @return this. - * @throws JSONException - */ - public JSONObject put(String key, Collection value) throws JSONException { - this.put(key, new JSONArray(value)); - return this; - } - - /** - * Put a key/double pair in the JSONObject. - * - * @param key - * A key string. - * @param value - * A double which is the value. - * @return this. - * @throws JSONException - * If the key is null or if the number is invalid. - */ - public JSONObject put(String key, double value) throws JSONException { - this.put(key, new Double(value)); - return this; - } - - /** - * Put a key/int pair in the JSONObject. - * - * @param key - * A key string. - * @param value - * An int which is the value. - * @return this. - * @throws JSONException - * If the key is null. - */ - public JSONObject put(String key, int value) throws JSONException { - this.put(key, new Integer(value)); - return this; - } - - /** - * Put a key/long pair in the JSONObject. - * - * @param key - * A key string. - * @param value - * A long which is the value. - * @return this. - * @throws JSONException - * If the key is null. - */ - public JSONObject put(String key, long value) throws JSONException { - this.put(key, new Long(value)); - return this; - } - - /** - * Put a key/value pair in the JSONObject, where the value will be a - * JSONObject which is produced from a Map. - * - * @param key - * A key string. - * @param value - * A Map value. - * @return this. - * @throws JSONException - */ - public JSONObject put(String key, Map value) throws JSONException { - this.put(key, new JSONObject(value)); - return this; - } - - /** - * Put a key/value pair in the JSONObject. If the value is null, then the - * key will be removed from the JSONObject if it is present. - * - * @param key - * A key string. - * @param value - * An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. - * @return this. - * @throws JSONException - * If the value is non-finite number or if the key is null. - */ - public JSONObject put(String key, Object value) throws JSONException { - if (key == null) { - throw new NullPointerException("Null key."); - } - if (value != null) { - testValidity(value); - this.map.put(key, value); - } else { - this.remove(key); - } - return this; - } - - /** - * Put a key/value pair in the JSONObject, but only if the key and the value - * are both non-null, and only if there is not already a member with that - * name. - * - * @param key string - * @param value object - * @return this. - * @throws JSONException - * if the key is a duplicate - */ - public JSONObject putOnce(String key, Object value) throws JSONException { - if (key != null && value != null) { - if (this.opt(key) != null) { - throw new JSONException("Duplicate key \"" + key + "\""); - } - this.put(key, value); - } - return this; - } - - /** - * Put a key/value pair in the JSONObject, but only if the key and the value - * are both non-null. - * - * @param key - * A key string. - * @param value - * An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. - * @return this. - * @throws JSONException - * If the value is a non-finite number. - */ - public JSONObject putOpt(String key, Object value) throws JSONException { - if (key != null && value != null) { - this.put(key, value); - } - return this; - } - - /** - * Produce a string in double quotes with backslash sequences in all the - * right places. A backslash will be inserted within = '\u0080' && c < '\u00a0') - || (c >= '\u2000' && c < '\u2100')) { - w.write("\\u"); - hhhh = Integer.toHexString(c); - w.write("0000", 0, 4 - hhhh.length()); - w.write(hhhh); - } else { - w.write(c); - } - } - } - w.write('"'); - return w; - } - - /** - * Remove a name and its value, if present. - * - * @param key - * The name to be removed. - * @return The value that was associated with the name, or null if there was - * no value. - */ - public Object remove(String key) { - return this.map.remove(key); - } - - /** - * Determine if two JSONObjects are similar. - * They must contain the same set of names which must be associated with - * similar values. - * - * @param other The other JSONObject - * @return true if they are equal - */ - public boolean similar(Object other) { - try { - if (!(other instanceof JSONObject)) { - return false; - } - Set set = this.keySet(); - if (!set.equals(((JSONObject)other).keySet())) { - return false; - } - Iterator iterator = set.iterator(); - while (iterator.hasNext()) { - String name = iterator.next(); - Object valueThis = this.get(name); - Object valueOther = ((JSONObject)other).get(name); - if (valueThis instanceof JSONObject) { - if (!((JSONObject)valueThis).similar(valueOther)) { - return false; - } - } else if (valueThis instanceof JSONArray) { - if (!((JSONArray)valueThis).similar(valueOther)) { - return false; - } - } else if (!valueThis.equals(valueOther)) { - return false; - } - } - return true; - } catch (Throwable exception) { - return false; - } - } - - /** - * Try to convert a string into a number, boolean, or null. If the string - * can't be converted, return the string. - * - * @param string - * A String. - * @return A simple JSON value. - */ - public static Object stringToValue(String string) { - Double d; - if (string.equals("")) { - return string; - } - if (string.equalsIgnoreCase("true")) { - return Boolean.TRUE; - } - if (string.equalsIgnoreCase("false")) { - return Boolean.FALSE; - } - if (string.equalsIgnoreCase("null")) { - return JSONObject.NULL; - } - - /* - * If it might be a number, try converting it. If a number cannot be - * produced, then the value will just be a string. - */ - - char b = string.charAt(0); - if ((b >= '0' && b <= '9') || b == '-') { - try { - if (string.indexOf('.') > -1 || string.indexOf('e') > -1 - || string.indexOf('E') > -1) { - d = Double.valueOf(string); - if (!d.isInfinite() && !d.isNaN()) { - return d; - } - } else { - Long myLong = new Long(string); - if (string.equals(myLong.toString())) { - if (myLong == myLong.intValue()) { - return myLong.intValue(); - } else { - return myLong; - } - } - } - } catch (Exception ignore) { - } - } - return string; - } - - /** - * Throw an exception if the object is a NaN or infinite number. - * - * @param o - * The object to test. - * @throws JSONException - * If o is a non-finite number. - */ - public static void testValidity(Object o) throws JSONException { - if (o != null) { - if (o instanceof Double) { - if (((Double) o).isInfinite() || ((Double) o).isNaN()) { - throw new JSONException( - "JSON does not allow non-finite numbers."); - } - } else if (o instanceof Float) { - if (((Float) o).isInfinite() || ((Float) o).isNaN()) { - throw new JSONException( - "JSON does not allow non-finite numbers."); - } - } - } - } - - /** - * Produce a JSONArray containing the values of the members of this - * JSONObject. - * - * @param names - * A JSONArray containing a list of key strings. This determines - * the sequence of the values in the result. - * @return A JSONArray of values. - * @throws JSONException - * If any of the values are non-finite numbers. - */ - public JSONArray toJSONArray(JSONArray names) throws JSONException { - if (names == null || names.length() == 0) { - return null; - } - JSONArray ja = new JSONArray(); - for (int i = 0; i < names.length(); i += 1) { - ja.put(this.opt(names.getString(i))); - } - return ja; - } - - /** - * Make a JSON text of this JSONObject. For compactness, no whitespace is - * added. If this would not result in a syntactically correct JSON text, - * then null will be returned instead. - *

- * Warning: This method assumes that the data structure is acyclical. - * - * @return a printable, displayable, portable, transmittable representation - * of the object, beginning with { (left - * brace) and ending with } (right - * brace). - */ - public String toString() { - try { - return this.toString(0); - } catch (Exception e) { - return null; - } - } - - /** - * Make a prettyprinted JSON text of this JSONObject. - *

- * Warning: This method assumes that the data structure is acyclical. - * - * @param indentFactor - * The number of spaces to add to each level of indentation. - * @return a printable, displayable, portable, transmittable representation - * of the object, beginning with { (left - * brace) and ending with } (right - * brace). - * @throws JSONException - * If the object contains an invalid number. - */ - public String toString(int indentFactor) throws JSONException { - StringWriter w = new StringWriter(); - synchronized (w.getBuffer()) { - return this.write(w, indentFactor, 0).toString(); - } - } - - /** - * Make a JSON text of an Object value. If the object has an - * value.toJSONString() method, then that method will be used to produce the - * JSON text. The method is required to produce a strictly conforming text. - * If the object does not contain a toJSONString method (which is the most - * common case), then a text will be produced by other means. If the value - * is an array or Collection, then a JSONArray will be made from it and its - * toJSONString method will be called. If the value is a MAP, then a - * JSONObject will be made from it and its toJSONString method will be - * called. Otherwise, the value's toString method will be called, and the - * result will be quoted. - * - *

- * Warning: This method assumes that the data structure is acyclical. - * - * @param value - * The value to be serialized. - * @return a printable, displayable, transmittable representation of the - * object, beginning with { (left - * brace) and ending with } (right - * brace). - * @throws JSONException - * If the value is or contains an invalid number. - */ - public static String valueToString(Object value) throws JSONException { - if (value == null || value.equals(null)) { - return "null"; - } - if (value instanceof JSONString) { - Object object; - try { - object = ((JSONString) value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - if (object instanceof String) { - return (String) object; - } - throw new JSONException("Bad value from toJSONString: " + object); - } - if (value instanceof Number) { - return numberToString((Number) value); - } - if (value instanceof Boolean || value instanceof JSONObject - || value instanceof JSONArray) { - return value.toString(); - } - if (value instanceof Map) { - @SuppressWarnings("unchecked") - Map map = (Map) value; - return new JSONObject(map).toString(); - } - if (value instanceof Collection) { - @SuppressWarnings("unchecked") - Collection coll = (Collection) value; - return new JSONArray(coll).toString(); - } - if (value.getClass().isArray()) { - return new JSONArray(value).toString(); - } - return quote(value.toString()); - } - - /** - * Wrap an object, if necessary. If the object is null, return the NULL - * object. If it is an array or collection, wrap it in a JSONArray. If it is - * a map, wrap it in a JSONObject. If it is a standard property (Double, - * String, et al) then it is already wrapped. Otherwise, if it comes from - * one of the java packages, turn it into a string. And if it doesn't, try - * to wrap it in a JSONObject. If the wrapping fails, then null is returned. - * - * @param object - * The object to wrap - * @return The wrapped value - */ - public static Object wrap(Object object) { - try { - if (object == null) { - return NULL; - } - if (object instanceof JSONObject || object instanceof JSONArray - || NULL.equals(object) || object instanceof JSONString - || object instanceof Byte || object instanceof Character - || object instanceof Short || object instanceof Integer - || object instanceof Long || object instanceof Boolean - || object instanceof Float || object instanceof Double - || object instanceof String || object instanceof BigInteger - || object instanceof BigDecimal) { - return object; - } - - if (object instanceof Collection) { - @SuppressWarnings("unchecked") - Collection coll = (Collection) object; - return new JSONArray(coll); - } - if (object.getClass().isArray()) { - return new JSONArray(object); - } - if (object instanceof Map) { - @SuppressWarnings("unchecked") - Map map = (Map) object; - return new JSONObject(map); - } - Package objectPackage = object.getClass().getPackage(); - String objectPackageName = objectPackage != null ? objectPackage - .getName() : ""; - if (objectPackageName.startsWith("java.") - || objectPackageName.startsWith("javax.") - || object.getClass().getClassLoader() == null) { - return object.toString(); - } - return new JSONObject(object); - } catch (Exception exception) { - return null; - } - } - - /** - * Write the contents of the JSONObject as JSON text to a writer. For - * compactness, no whitespace is added. - *

- * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer) throws JSONException { - return this.write(writer, 0, 0); - } - - static final Writer writeValue(Writer writer, Object value, - int indentFactor, int indent) throws JSONException, IOException { - if (value == null || value.equals(null)) { - writer.write("null"); - } else if (value instanceof JSONObject) { - ((JSONObject) value).write(writer, indentFactor, indent); - } else if (value instanceof JSONArray) { - ((JSONArray) value).write(writer, indentFactor, indent); - } else if (value instanceof Map) { - @SuppressWarnings("unchecked") - Map map = (Map) value; - new JSONObject(map).write(writer, indentFactor, indent); - } else if (value instanceof Collection) { - @SuppressWarnings("unchecked") - Collection coll = (Collection) value; - new JSONArray(coll).write(writer, indentFactor, - indent); - } else if (value.getClass().isArray()) { - new JSONArray(value).write(writer, indentFactor, indent); - } else if (value instanceof Number) { - writer.write(numberToString((Number) value)); - } else if (value instanceof Boolean) { - writer.write(value.toString()); - } else if (value instanceof JSONString) { - Object o; - try { - o = ((JSONString) value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - writer.write(o != null ? o.toString() : quote(value.toString())); - } else { - quote(value.toString(), writer); - } - return writer; - } - - static final void indent(Writer writer, int indent) throws IOException { - for (int i = 0; i < indent; i += 1) { - writer.write(' '); - } - } - - /** - * Write the contents of the JSONObject as JSON text to a writer. For - * compactness, no whitespace is added. - *

- * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - Writer write(Writer writer, int indentFactor, int indent) - throws JSONException { - try { - boolean commanate = false; - final int length = this.length(); - Iterator keys = this.keys(); - writer.write('{'); - - if (length == 1) { - Object key = keys.next(); - writer.write(quote(key.toString())); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - writeValue(writer, this.map.get(key), indentFactor, indent); - } else if (length != 0) { - final int newindent = indent + indentFactor; - while (keys.hasNext()) { - Object key = keys.next(); - if (commanate) { - writer.write(','); - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, newindent); - writer.write(quote(key.toString())); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - writeValue(writer, this.map.get(key), indentFactor, newindent); - commanate = true; - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, indent); - } - writer.write('}'); - return writer; - } catch (IOException exception) { - throw new JSONException(exception); - } - } -} +package org.json; + +/* + Copyright (c) 2002 JSON.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + The Software shall be used for Good, not Evil. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + */ + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.math.*; +import java.util.Collection; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.ResourceBundle; +import java.util.Set; + +/** + * A JSONObject is an unordered collection of name/value pairs. Its external + * form is a string wrapped in curly braces with colons between the names and + * values, and commas between the values and names. The internal form is an + * object having get and opt methods for accessing + * the values by name, and put methods for adding or replacing + * values by name. The values can be any of these types: Boolean, + * JSONArray, JSONObject, Number, + * String, or the JSONObject.NULL object. A + * JSONObject constructor can be used to convert an external form JSON text + * into an internal form whose values can be retrieved with the + * get and opt methods, or to convert values into a + * JSON text using the put and toString methods. A + * get method returns a value if one can be found, and throws an + * exception if one cannot be found. An opt method returns a + * default value instead of throwing an exception, and so is useful for + * obtaining optional values. + *

+ * The generic get() and opt() methods return an + * object, which you can cast or query for type. There are also typed + * get and opt methods that do type checking and type + * coercion for you. The opt methods differ from the get methods in that they + * do not throw. Instead, they return a specified value, such as null. + *

+ * The put methods add or replace values in an object. For + * example, + * + *

+ * myString = new JSONObject()
+ *         .put("JSON", "Hello, World!").toString();
+ * 
+ * + * produces the string {"JSON": "Hello, World"}. + *

+ * The texts produced by the toString methods strictly conform to + * the JSON syntax rules. The constructors are more forgiving in the texts they + * will accept: + *

    + *
  • An extra , (comma) may appear just + * before the closing brace.
  • + *
  • Strings may be quoted with ' (single + * quote).
  • + *
  • Strings do not need to be quoted at all if they do not begin with a + * quote or single quote, and if they do not contain leading or trailing + * spaces, and if they do not contain any of these characters: + * { } [ ] / \ : , # and if they do not look like numbers and + * if they are not the reserved words true, false, + * or null.
  • + *
+ * + * @author JSON.org + * @version 2015-07-22 + */ +public class JSONObject { + /** + * JSONObject.NULL is equivalent to the value that JavaScript calls null, + * whilst Java's null is equivalent to the value that JavaScript calls + * undefined. + */ + private static final class Null { + + /** + * There is only intended to be a single instance of the NULL object, + * so the clone method returns itself. + * + * @return NULL. + */ + @Override + protected final Object clone() { + return this; + } + + /** + * A Null object is equal to the null value and to itself. + * + * @param object + * An object to test for nullness. + * @return true if the object parameter is the JSONObject.NULL object or + * null. + */ + @Override + public boolean equals(Object object) { + return object == null || object == this; + } + + /** + * Get the "null" string value. + * + * @return The string "null". + */ + public String toString() { + return "null"; + } + } + + /** + * The map where the JSONObject's properties are kept. + */ + private final Map map; + + /** + * It is sometimes more convenient and less ambiguous to have a + * NULL object than to use Java's null value. + * JSONObject.NULL.equals(null) returns true. + * JSONObject.NULL.toString() returns "null". + */ + public static final Object NULL = new Null(); + + /** + * Construct an empty JSONObject. + */ + public JSONObject() { + this.map = new HashMap(); + } + + /** + * Construct a JSONObject from a subset of another JSONObject. An array of + * strings is used to identify the keys that should be copied. Missing keys + * are ignored. + * + * @param jo + * A JSONObject. + * @param names + * An array of strings. + * @throws JSONException + * @exception JSONException + * If a value is a non-finite number or if a name is + * duplicated. + */ + public JSONObject(JSONObject jo, String[] names) { + this(); + for (int i = 0; i < names.length; i += 1) { + try { + this.putOnce(names[i], jo.opt(names[i])); + } catch (Exception ignore) { + } + } + } + + /** + * Construct a JSONObject from a JSONTokener. + * + * @param x + * A JSONTokener object containing the source string. + * @throws JSONException + * If there is a syntax error in the source string or a + * duplicated key. + */ + public JSONObject(JSONTokener x) throws JSONException { + this(); + char c; + String key; + + if (x.nextClean() != '{') { + throw x.syntaxError("A JSONObject text must begin with '{'"); + } + for (;;) { + c = x.nextClean(); + switch (c) { + case 0: + throw x.syntaxError("A JSONObject text must end with '}'"); + case '}': + return; + default: + x.back(); + key = x.nextValue().toString(); + } + +// The key is followed by ':'. + + c = x.nextClean(); + if (c != ':') { + throw x.syntaxError("Expected a ':' after a key"); + } + this.putOnce(key, x.nextValue()); + +// Pairs are separated by ','. + + switch (x.nextClean()) { + case ';': + case ',': + if (x.nextClean() == '}') { + return; + } + x.back(); + break; + case '}': + return; + default: + throw x.syntaxError("Expected a ',' or '}'"); + } + } + } + + /** + * Construct a JSONObject from a Map. + * + * @param map + * A map object that can be used to initialize the contents of + * the JSONObject. + * @throws JSONException + */ + public JSONObject(Map map) { + this.map = new HashMap(); + if (map != null) { + Iterator> i = map.entrySet().iterator(); + while (i.hasNext()) { + Entry entry = i.next(); + Object value = entry.getValue(); + if (value != null) { + this.map.put(entry.getKey(), wrap(value)); + } + } + } + } + + /** + * Construct a JSONObject from an Object using bean getters. It reflects on + * all of the public methods of the object. For each of the methods with no + * parameters and a name starting with "get" or + * "is" followed by an uppercase letter, the method is invoked, + * and a key and the value returned from the getter method are put into the + * new JSONObject. + * + * The key is formed by removing the "get" or "is" + * prefix. If the second remaining character is not upper case, then the + * first character is converted to lower case. + * + * For example, if an object has a method named "getName", and + * if the result of calling object.getName() is + * "Larry Fine", then the JSONObject will contain + * "name": "Larry Fine". + * + * @param bean + * An object that has getter methods that should be used to make + * a JSONObject. + */ + public JSONObject(Object bean) { + this(); + this.populateMap(bean); + } + + /** + * Construct a JSONObject from an Object, using reflection to find the + * public members. The resulting JSONObject's keys will be the strings from + * the names array, and the values will be the field values associated with + * those keys in the object. If a key is not found or not visible, then it + * will not be copied into the new JSONObject. + * + * @param object + * An object that has fields that should be used to make a + * JSONObject. + * @param names + * An array of strings, the names of the fields to be obtained + * from the object. + */ + public JSONObject(Object object, String names[]) { + this(); + Class c = object.getClass(); + for (int i = 0; i < names.length; i += 1) { + String name = names[i]; + try { + this.putOpt(name, c.getField(name).get(object)); + } catch (Exception ignore) { + } + } + } + + /** + * Construct a JSONObject from a source JSON text string. This is the most + * commonly used JSONObject constructor. + * + * @param source + * A string beginning with { (left + * brace) and ending with } + *  (right brace). + * @exception JSONException + * If there is a syntax error in the source string or a + * duplicated key. + */ + public JSONObject(String source) throws JSONException { + this(new JSONTokener(source)); + } + + /** + * Construct a JSONObject from a ResourceBundle. + * + * @param baseName + * The ResourceBundle base name. + * @param locale + * The Locale to load the ResourceBundle for. + * @throws JSONException + * If any JSONExceptions are detected. + */ + public JSONObject(String baseName, Locale locale) throws JSONException { + this(); + ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, + Thread.currentThread().getContextClassLoader()); + +// Iterate through the keys in the bundle. + + Enumeration keys = bundle.getKeys(); + while (keys.hasMoreElements()) { + Object key = keys.nextElement(); + if (key != null) { + +// Go through the path, ensuring that there is a nested JSONObject for each +// segment except the last. Add the value using the last segment's name into +// the deepest nested JSONObject. + + String[] path = ((String) key).split("\\."); + int last = path.length - 1; + JSONObject target = this; + for (int i = 0; i < last; i += 1) { + String segment = path[i]; + JSONObject nextTarget = target.optJSONObject(segment); + if (nextTarget == null) { + nextTarget = new JSONObject(); + target.put(segment, nextTarget); + } + target = nextTarget; + } + target.put(path[last], bundle.getString((String) key)); + } + } + } + + /** + * Accumulate values under a key. It is similar to the put method except + * that if there is already an object stored under the key then a JSONArray + * is stored under the key to hold all of the accumulated values. If there + * is already a JSONArray, then the new value is appended to it. In + * contrast, the put method replaces the previous value. + * + * If only one value is accumulated that is not a JSONArray, then the result + * will be the same as using put. But if multiple values are accumulated, + * then the result will be like append. + * + * @param key + * A key string. + * @param value + * An object to be accumulated under the key. + * @return this. + * @throws JSONException + * If the value is an invalid number or if the key is null. + */ + public JSONObject accumulate(String key, Object value) throws JSONException { + testValidity(value); + Object object = this.opt(key); + if (object == null) { + this.put(key, + value instanceof JSONArray ? new JSONArray().put(value) + : value); + } else if (object instanceof JSONArray) { + ((JSONArray) object).put(value); + } else { + this.put(key, new JSONArray().put(object).put(value)); + } + return this; + } + + /** + * Append values to the array under a key. If the key does not exist in the + * JSONObject, then the key is put in the JSONObject with its value being a + * JSONArray containing the value parameter. If the key was already + * associated with a JSONArray, then the value parameter is appended to it. + * + * @param key + * A key string. + * @param value + * An object to be accumulated under the key. + * @return this. + * @throws JSONException + * If the key is null or if the current value associated with + * the key is not a JSONArray. + */ + public JSONObject append(String key, Object value) throws JSONException { + testValidity(value); + Object object = this.opt(key); + if (object == null) { + this.put(key, new JSONArray().put(value)); + } else if (object instanceof JSONArray) { + this.put(key, ((JSONArray) object).put(value)); + } else { + throw new JSONException("JSONObject[" + key + + "] is not a JSONArray."); + } + return this; + } + + /** + * Produce a string from a double. The string "null" will be returned if the + * number is not finite. + * + * @param d + * A double. + * @return A String. + */ + public static String doubleToString(double d) { + if (Double.isInfinite(d) || Double.isNaN(d)) { + return "null"; + } + +// Shave off trailing zeros and decimal point, if possible. + + String string = Double.toString(d); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) { + while (string.endsWith("0")) { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get the value object associated with a key. + * + * @param key + * A key string. + * @return The object associated with the key. + * @throws JSONException + * if the key is not found. + */ + public Object get(String key) throws JSONException { + if (key == null) { + throw new JSONException("Null key."); + } + Object object = this.opt(key); + if (object == null) { + throw new JSONException("JSONObject[" + quote(key) + "] not found."); + } + return object; + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @return The enum value associated with the key + * @throws JSONException + * if the key is not found or if the value cannot be converted + * to an enum. + */ + public > E getEnum(Class clazz, String key) throws JSONException { + E val = optEnum(clazz, key); + if(val==null) { + // JSONException should really take a throwable argument. + // If it did, I would re-implement this with the Enum.valueOf + // method and place any thrown exception in the JSONException + throw new JSONException("JSONObject[" + quote(key) + + "] is not an enum of type " + quote(clazz.getSimpleName()) + + "."); + } + return val; + } + + /** + * Get the boolean value associated with a key. + * + * @param key + * A key string. + * @return The truth. + * @throws JSONException + * if the value is not a Boolean or the String "true" or + * "false". + */ + public boolean getBoolean(String key) throws JSONException { + Object object = this.get(key); + if (object.equals(Boolean.FALSE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("false"))) { + return false; + } else if (object.equals(Boolean.TRUE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("true"))) { + return true; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a Boolean."); + } + /** + * Get the boolean associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The truth. + */ + public boolean getBooleanSafe(String key, boolean defaultValue){ + if (has(key)) try {return getBoolean(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get the BigInteger value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value cannot + * be converted to BigInteger. + */ + public BigInteger getBigInteger(String key) throws JSONException { + Object object = this.get(key); + try { + return new BigInteger(object.toString()); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] could not be converted to BigInteger."); + } + } + + /** + * Get the BigInteger value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The numeric value. + */ + public BigInteger getBigIntegerSafe(String key, BigInteger defaultValue){ + if (has(key)) try {return getBigInteger(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get the BigDecimal value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value + * cannot be converted to BigDecimal. + */ + public BigDecimal getBigDecimal(String key) throws JSONException { + Object object = this.get(key); + try { + return new BigDecimal(object.toString()); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] could not be converted to BigDecimal."); + } + } + + /** + * Get the BigDecimal value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The numeric value. + */ + public BigDecimal getBigDecimalSafe(String key, BigDecimal defaultValue){ + if (has(key)) try {return getBigDecimal(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get the double value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number + * object and cannot be converted to a number. + */ + public double getDouble(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).doubleValue() + : Double.parseDouble((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not a number."); + } + } + + /** + * Get the double value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The numeric value. + */ + public double getDoubleSafe(String key, double defaultValue){ + if (has(key)) try {return getDouble(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get the int value associated with a key. + * + * @param key + * A key string. + * @return The integer value. + * @throws JSONException + * if the key is not found or if the value cannot be converted + * to an integer. + */ + public int getInt(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).intValue() + : Integer.parseInt((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not an int."); + } + } + + /** + * Get the int value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The numeric value. + */ + public int getIntSafe(String key, int defaultValue){ + if (has(key)) try {return getInt(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get the JSONArray value associated with a key. + * + * @param key + * A key string. + * @return A JSONArray which is the value. + * @throws JSONException + * if the key is not found or if the value is not a JSONArray. + */ + public JSONArray getJSONArray(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof JSONArray) { + return (JSONArray) object; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a JSONArray."); + } + + /** + * Get the JSONObject value associated with a key. + * + * @param key + * A key string. + * @return A JSONObject which is the value. + * @throws JSONException + * if the key is not found or if the value is not a JSONObject. + */ + public JSONObject getJSONObject(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof JSONObject) { + return (JSONObject) object; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a JSONObject."); + } + + /** + * Get the long value associated with a key. + * + * @param key + * A key string. + * @return The long value. + * @throws JSONException + * if the key is not found or if the value cannot be converted + * to a long. + */ + public long getLong(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).longValue() + : Long.parseLong((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not a long."); + } + } + + /** + * Get the long value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return The numeric value. + */ + public long getBigIntegerSafe(String key, long defaultValue){ + if (has(key)) try {return getLong(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Get an array of field names from a JSONObject. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(JSONObject jo) { + int length = jo.length(); + if (length == 0) { + return null; + } + Iterator iterator = jo.keys(); + String[] names = new String[length]; + int i = 0; + while (iterator.hasNext()) { + names[i] = iterator.next(); + i += 1; + } + return names; + } + + /** + * Get an array of field names from an Object. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(Object object) { + if (object == null) { + return null; + } + Class klass = object.getClass(); + Field[] fields = klass.getFields(); + int length = fields.length; + if (length == 0) { + return null; + } + String[] names = new String[length]; + for (int i = 0; i < length; i += 1) { + names[i] = fields[i].getName(); + } + return names; + } + + /** + * Get the string associated with a key. + * + * @param key + * A key string. + * @return A string which is the value. + * @throws JSONException + * if there is no string value for the key. + */ + public String getString(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof String) { + return (String) object; + } + throw new JSONException("JSONObject[" + quote(key) + "] not a string."); + } + + /** + * Get the string associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead. + * + * @param key A key String. + * @param defaultValue The value to return if the key doesn't exist or errors occur. + * @return A string which is the value. + */ + public String getStringSafe(String key, String defaultValue){ + if (has(key)) try {return getString(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; + } + + /** + * Determine if the JSONObject contains a specific key. + * + * @param key + * A key string. + * @return true if the key exists in the JSONObject. + */ + public boolean has(String key) { + return this.map.containsKey(key); + } + + /** + * Increment a property of a JSONObject. If there is no such property, + * create one with a value of 1. If there is such a property, and if it is + * an Integer, Long, Double, or Float, then add one to it. + * + * @param key + * A key string. + * @return this. + * @throws JSONException + * If there is already a property with this name that is not an + * Integer, Long, Double, or Float. + */ + public JSONObject increment(String key) throws JSONException { + Object value = this.opt(key); + if (value == null) { + this.put(key, 1); + } else if (value instanceof BigInteger) { + this.put(key, ((BigInteger)value).add(BigInteger.ONE)); + } else if (value instanceof BigDecimal) { + this.put(key, ((BigDecimal)value).add(BigDecimal.ONE)); + } else if (value instanceof Integer) { + this.put(key, (Integer) value + 1); + } else if (value instanceof Long) { + this.put(key, (Long) value + 1); + } else if (value instanceof Double) { + this.put(key, (Double) value + 1); + } else if (value instanceof Float) { + this.put(key, (Float) value + 1); + } else { + throw new JSONException("Unable to increment [" + quote(key) + "]."); + } + return this; + } + + /** + * Determine if the value associated with the key is null or if there is no + * value. + * + * @param key + * A key string. + * @return true if there is no value associated with the key or if the value + * is the JSONObject.NULL object. + */ + public boolean isNull(String key) { + return JSONObject.NULL.equals(this.opt(key)); + } + + /** + * Get an enumeration of the keys of the JSONObject. + * + * @return An iterator of the keys. + */ + public Iterator keys() { + return this.keySet().iterator(); + } + + /** + * Get a set of keys of the JSONObject. + * + * @return A keySet. + */ + public Set keySet() { + return this.map.keySet(); + } + + /** + * Get the number of keys stored in the JSONObject. + * + * @return The number of keys in the JSONObject. + */ + public int length() { + return this.map.size(); + } + + /** + * Produce a JSONArray containing the names of the elements of this + * JSONObject. + * + * @return A JSONArray containing the key strings, or null if the JSONObject + * is empty. + */ + public JSONArray names() { + JSONArray ja = new JSONArray(); + Iterator keys = this.keys(); + while (keys.hasNext()) { + ja.put(keys.next()); + } + return ja.length() == 0 ? null : ja; + } + + /** + * Produce a string from a Number. + * + * @param number + * A Number + * @return A String. + * @throws JSONException + * If n is a non-finite number. + */ + public static String numberToString(Number number) throws JSONException { + if (number == null) { + throw new JSONException("Null pointer"); + } + testValidity(number); + +// Shave off trailing zeros and decimal point, if possible. + + String string = number.toString(); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) { + while (string.endsWith("0")) { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get an optional value associated with a key. + * + * @param key + * A key string. + * @return An object which is the value, or null if there is no value. + */ + public Object opt(String key) { + return key == null ? null : this.map.get(key); + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @return The enum value associated with the key or null if not found + */ + public > E optEnum(Class clazz, String key) { + return this.optEnum(clazz, key, null); + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @param defaultValue + * The default in case the value is not found + * @return The enum value associated with the key or defaultValue + * if the value is not found or cannot be assigned to clazz + */ + public > E optEnum(Class clazz, String key, E defaultValue) { + try { + Object val = this.opt(key); + if (NULL.equals(val)) { + return defaultValue; + } + if (clazz.isAssignableFrom(val.getClass())) { + // we just checked it! + @SuppressWarnings("unchecked") + E myE = (E) val; + return myE; + } + return Enum.valueOf(clazz, val.toString()); + } catch (IllegalArgumentException | NullPointerException e) { + return defaultValue; + } + } + + /** + * Get an optional boolean associated with a key. It returns false if there + * is no such key, or if the value is not Boolean.TRUE or the String "true". + * + * @param key + * A key string. + * @return The truth. + */ + public boolean optBoolean(String key) { + return this.optBoolean(key, false); + } + + /** + * Get an optional boolean associated with a key. It returns the + * defaultValue if there is no such key, or if it is not a Boolean or the + * String "true" or "false" (case insensitive). + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return The truth. + */ + public boolean optBoolean(String key, boolean defaultValue) { + try { + return this.getBoolean(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional double associated with a key, or NaN if there is no such + * key or if its value is not a number. If the value is a string, an attempt + * will be made to evaluate it as a number. + * + * @param key + * A string which is the key. + * @return An object which is the value. + */ + public double optDouble(String key) { + return this.optDouble(key, Double.NaN); + } + + /** + * Get an optional BigInteger associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public BigInteger optBigInteger(String key, BigInteger defaultValue) { + try { + return this.getBigInteger(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional BigDecimal associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { + try { + return this.getBigDecimal(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional double associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public double optDouble(String key, double defaultValue) { + try { + return this.getDouble(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional int value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @return An object which is the value. + */ + public int optInt(String key) { + return this.optInt(key, 0); + } + + /** + * Get an optional int value associated with a key, or the default if there + * is no such key or if the value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public int optInt(String key, int defaultValue) { + try { + return this.getInt(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional JSONArray associated with a key. It returns null if there + * is no such key, or if its value is not a JSONArray. + * + * @param key + * A key string. + * @return A JSONArray which is the value. + */ + public JSONArray optJSONArray(String key) { + Object o = this.opt(key); + return o instanceof JSONArray ? (JSONArray) o : null; + } + + /** + * Get an optional JSONObject associated with a key. It returns null if + * there is no such key, or if its value is not a JSONObject. + * + * @param key + * A key string. + * @return A JSONObject which is the value. + */ + public JSONObject optJSONObject(String key) { + Object object = this.opt(key); + return object instanceof JSONObject ? (JSONObject) object : null; + } + + /** + * Get an optional long value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @return An object which is the value. + */ + public long optLong(String key) { + return this.optLong(key, 0); + } + + /** + * Get an optional long value associated with a key, or the default if there + * is no such key or if the value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public long optLong(String key, long defaultValue) { + try { + return this.getLong(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional string associated with a key. It returns an empty string + * if there is no such key. If the value is not a string and is not null, + * then it is converted to a string. + * + * @param key + * A key string. + * @return A string which is the value. + */ + public String optString(String key) { + return this.optString(key, ""); + } + + /** + * Get an optional string associated with a key. It returns the defaultValue + * if there is no such key. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return A string which is the value. + */ + public String optString(String key, String defaultValue) { + Object object = this.opt(key); + return NULL.equals(object) ? defaultValue : object.toString(); + } + + private void populateMap(Object bean) { + Class klass = bean.getClass(); + +// If klass is a System class then set includeSuperClass to false. + + boolean includeSuperClass = klass.getClassLoader() != null; + + Method[] methods = includeSuperClass ? klass.getMethods() : klass + .getDeclaredMethods(); + for (int i = 0; i < methods.length; i += 1) { + try { + Method method = methods[i]; + if (Modifier.isPublic(method.getModifiers())) { + String name = method.getName(); + String key = ""; + if (name.startsWith("get")) { + if ("getClass".equals(name) + || "getDeclaringClass".equals(name)) { + key = ""; + } else { + key = name.substring(3); + } + } else if (name.startsWith("is")) { + key = name.substring(2); + } + if (key.length() > 0 + && Character.isUpperCase(key.charAt(0)) + && method.getParameterTypes().length == 0) { + if (key.length() == 1) { + key = key.toLowerCase(); + } else if (!Character.isUpperCase(key.charAt(1))) { + key = key.substring(0, 1).toLowerCase() + + key.substring(1); + } + + Object result = method.invoke(bean, (Object[]) null); + if (result != null) { + this.map.put(key, wrap(result)); + } + } + } + } catch (Exception ignore) { + } + } + } + + /** + * Put a key/boolean pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A boolean which is the value. + * @return this. + * @throws JSONException + * If the key is null. + */ + public JSONObject put(String key, boolean value) throws JSONException { + this.put(key, value ? Boolean.TRUE : Boolean.FALSE); + return this; + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a + * JSONArray which is produced from a Collection. + * + * @param key + * A key string. + * @param value + * A Collection value. + * @return this. + * @throws JSONException + */ + public JSONObject put(String key, Collection value) throws JSONException { + this.put(key, new JSONArray(value)); + return this; + } + + /** + * Put a key/double pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A double which is the value. + * @return this. + * @throws JSONException + * If the key is null or if the number is invalid. + */ + public JSONObject put(String key, double value) throws JSONException { + this.put(key, new Double(value)); + return this; + } + + /** + * Put a key/int pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * An int which is the value. + * @return this. + * @throws JSONException + * If the key is null. + */ + public JSONObject put(String key, int value) throws JSONException { + this.put(key, new Integer(value)); + return this; + } + + /** + * Put a key/long pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A long which is the value. + * @return this. + * @throws JSONException + * If the key is null. + */ + public JSONObject put(String key, long value) throws JSONException { + this.put(key, new Long(value)); + return this; + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a + * JSONObject which is produced from a Map. + * + * @param key + * A key string. + * @param value + * A Map value. + * @return this. + * @throws JSONException + */ + public JSONObject put(String key, Map value) throws JSONException { + this.put(key, new JSONObject(value)); + return this; + } + + /** + * Put a key/value pair in the JSONObject. If the value is null, then the + * key will be removed from the JSONObject if it is present. + * + * @param key + * A key string. + * @param value + * An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. + * @return this. + * @throws JSONException + * If the value is non-finite number or if the key is null. + */ + public JSONObject put(String key, Object value) throws JSONException { + if (key == null) { + throw new NullPointerException("Null key."); + } + if (value != null) { + testValidity(value); + this.map.put(key, value); + } else { + this.remove(key); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null, and only if there is not already a member with that + * name. + * + * @param key string + * @param value object + * @return this. + * @throws JSONException + * if the key is a duplicate + */ + public JSONObject putOnce(String key, Object value) throws JSONException { + if (key != null && value != null) { + if (this.opt(key) != null) { + throw new JSONException("Duplicate key \"" + key + "\""); + } + this.put(key, value); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null. + * + * @param key + * A key string. + * @param value + * An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. + * @return this. + * @throws JSONException + * If the value is a non-finite number. + */ + public JSONObject putOpt(String key, Object value) throws JSONException { + if (key != null && value != null) { + this.put(key, value); + } + return this; + } + + /** + * Produce a string in double quotes with backslash sequences in all the + * right places. A backslash will be inserted within = '\u0080' && c < '\u00a0') + || (c >= '\u2000' && c < '\u2100')) { + w.write("\\u"); + hhhh = Integer.toHexString(c); + w.write("0000", 0, 4 - hhhh.length()); + w.write(hhhh); + } else { + w.write(c); + } + } + } + w.write('"'); + return w; + } + + /** + * Remove a name and its value, if present. + * + * @param key + * The name to be removed. + * @return The value that was associated with the name, or null if there was + * no value. + */ + public Object remove(String key) { + return this.map.remove(key); + } + + /** + * Determine if two JSONObjects are similar. + * They must contain the same set of names which must be associated with + * similar values. + * + * @param other The other JSONObject + * @return true if they are equal + */ + public boolean similar(Object other) { + try { + if (!(other instanceof JSONObject)) { + return false; + } + Set set = this.keySet(); + if (!set.equals(((JSONObject)other).keySet())) { + return false; + } + Iterator iterator = set.iterator(); + while (iterator.hasNext()) { + String name = iterator.next(); + Object valueThis = this.get(name); + Object valueOther = ((JSONObject)other).get(name); + if (valueThis instanceof JSONObject) { + if (!((JSONObject)valueThis).similar(valueOther)) { + return false; + } + } else if (valueThis instanceof JSONArray) { + if (!((JSONArray)valueThis).similar(valueOther)) { + return false; + } + } else if (!valueThis.equals(valueOther)) { + return false; + } + } + return true; + } catch (Throwable exception) { + return false; + } + } + + /** + * Try to convert a string into a number, boolean, or null. If the string + * can't be converted, return the string. + * + * @param string + * A String. + * @return A simple JSON value. + */ + public static Object stringToValue(String string) { + Double d; + if (string.equals("")) { + return string; + } + if (string.equalsIgnoreCase("true")) { + return Boolean.TRUE; + } + if (string.equalsIgnoreCase("false")) { + return Boolean.FALSE; + } + if (string.equalsIgnoreCase("null")) { + return JSONObject.NULL; + } + + /* + * If it might be a number, try converting it. If a number cannot be + * produced, then the value will just be a string. + */ + + char b = string.charAt(0); + if ((b >= '0' && b <= '9') || b == '-') { + try { + if (string.indexOf('.') > -1 || string.indexOf('e') > -1 + || string.indexOf('E') > -1) { + d = Double.valueOf(string); + if (!d.isInfinite() && !d.isNaN()) { + return d; + } + } else { + Long myLong = new Long(string); + if (string.equals(myLong.toString())) { + if (myLong == myLong.intValue()) { + return myLong.intValue(); + } else { + return myLong; + } + } + } + } catch (Exception ignore) { + } + } + return string; + } + + /** + * Throw an exception if the object is a NaN or infinite number. + * + * @param o + * The object to test. + * @throws JSONException + * If o is a non-finite number. + */ + public static void testValidity(Object o) throws JSONException { + if (o != null) { + if (o instanceof Double) { + if (((Double) o).isInfinite() || ((Double) o).isNaN()) { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } else if (o instanceof Float) { + if (((Float) o).isInfinite() || ((Float) o).isNaN()) { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } + } + } + + /** + * Produce a JSONArray containing the values of the members of this + * JSONObject. + * + * @param names + * A JSONArray containing a list of key strings. This determines + * the sequence of the values in the result. + * @return A JSONArray of values. + * @throws JSONException + * If any of the values are non-finite numbers. + */ + public JSONArray toJSONArray(JSONArray names) throws JSONException { + if (names == null || names.length() == 0) { + return null; + } + JSONArray ja = new JSONArray(); + for (int i = 0; i < names.length(); i += 1) { + ja.put(this.opt(names.getString(i))); + } + return ja; + } + + /** + * Make a JSON text of this JSONObject. For compactness, no whitespace is + * added. If this would not result in a syntactically correct JSON text, + * then null will be returned instead. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return a printable, displayable, portable, transmittable representation + * of the object, beginning with { (left + * brace) and ending with } (right + * brace). + */ + public String toString() { + try { + return this.toString(0); + } catch (Exception e) { + return null; + } + } + + /** + * Make a prettyprinted JSON text of this JSONObject. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @param indentFactor + * The number of spaces to add to each level of indentation. + * @return a printable, displayable, portable, transmittable representation + * of the object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException + * If the object contains an invalid number. + */ + public String toString(int indentFactor) throws JSONException { + StringWriter w = new StringWriter(); + synchronized (w.getBuffer()) { + return this.write(w, indentFactor, 0).toString(); + } + } + + /** + * Make a JSON text of an Object value. If the object has an + * value.toJSONString() method, then that method will be used to produce the + * JSON text. The method is required to produce a strictly conforming text. + * If the object does not contain a toJSONString method (which is the most + * common case), then a text will be produced by other means. If the value + * is an array or Collection, then a JSONArray will be made from it and its + * toJSONString method will be called. If the value is a MAP, then a + * JSONObject will be made from it and its toJSONString method will be + * called. Otherwise, the value's toString method will be called, and the + * result will be quoted. + * + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @param value + * The value to be serialized. + * @return a printable, displayable, transmittable representation of the + * object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException + * If the value is or contains an invalid number. + */ + public static String valueToString(Object value) throws JSONException { + if (value == null || value.equals(null)) { + return "null"; + } + if (value instanceof JSONString) { + Object object; + try { + object = ((JSONString) value).toJSONString(); + } catch (Exception e) { + throw new JSONException(e); + } + if (object instanceof String) { + return (String) object; + } + throw new JSONException("Bad value from toJSONString: " + object); + } + if (value instanceof Number) { + return numberToString((Number) value); + } + if (value instanceof Boolean || value instanceof JSONObject + || value instanceof JSONArray) { + return value.toString(); + } + if (value instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) value; + return new JSONObject(map).toString(); + } + if (value instanceof Collection) { + @SuppressWarnings("unchecked") + Collection coll = (Collection) value; + return new JSONArray(coll).toString(); + } + if (value.getClass().isArray()) { + return new JSONArray(value).toString(); + } + return quote(value.toString()); + } + + /** + * Wrap an object, if necessary. If the object is null, return the NULL + * object. If it is an array or collection, wrap it in a JSONArray. If it is + * a map, wrap it in a JSONObject. If it is a standard property (Double, + * String, et al) then it is already wrapped. Otherwise, if it comes from + * one of the java packages, turn it into a string. And if it doesn't, try + * to wrap it in a JSONObject. If the wrapping fails, then null is returned. + * + * @param object + * The object to wrap + * @return The wrapped value + */ + public static Object wrap(Object object) { + try { + if (object == null) { + return NULL; + } + if (object instanceof JSONObject || object instanceof JSONArray + || NULL.equals(object) || object instanceof JSONString + || object instanceof Byte || object instanceof Character + || object instanceof Short || object instanceof Integer + || object instanceof Long || object instanceof Boolean + || object instanceof Float || object instanceof Double + || object instanceof String || object instanceof BigInteger + || object instanceof BigDecimal) { + return object; + } + + if (object instanceof Collection) { + @SuppressWarnings("unchecked") + Collection coll = (Collection) object; + return new JSONArray(coll); + } + if (object.getClass().isArray()) { + return new JSONArray(object); + } + if (object instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) object; + return new JSONObject(map); + } + Package objectPackage = object.getClass().getPackage(); + String objectPackageName = objectPackage != null ? objectPackage + .getName() : ""; + if (objectPackageName.startsWith("java.") + || objectPackageName.startsWith("javax.") + || object.getClass().getClassLoader() == null) { + return object.toString(); + } + return new JSONObject(object); + } catch (Exception exception) { + return null; + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer) throws JSONException { + return this.write(writer, 0, 0); + } + + static final Writer writeValue(Writer writer, Object value, + int indentFactor, int indent) throws JSONException, IOException { + if (value == null || value.equals(null)) { + writer.write("null"); + } else if (value instanceof JSONObject) { + ((JSONObject) value).write(writer, indentFactor, indent); + } else if (value instanceof JSONArray) { + ((JSONArray) value).write(writer, indentFactor, indent); + } else if (value instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) value; + new JSONObject(map).write(writer, indentFactor, indent); + } else if (value instanceof Collection) { + @SuppressWarnings("unchecked") + Collection coll = (Collection) value; + new JSONArray(coll).write(writer, indentFactor, + indent); + } else if (value.getClass().isArray()) { + new JSONArray(value).write(writer, indentFactor, indent); + } else if (value instanceof Number) { + writer.write(numberToString((Number) value)); + } else if (value instanceof Boolean) { + writer.write(value.toString()); + } else if (value instanceof JSONString) { + Object o; + try { + o = ((JSONString) value).toJSONString(); + } catch (Exception e) { + throw new JSONException(e); + } + writer.write(o != null ? o.toString() : quote(value.toString())); + } else { + quote(value.toString(), writer); + } + return writer; + } + + static final void indent(Writer writer, int indent) throws IOException { + for (int i = 0; i < indent; i += 1) { + writer.write(' '); + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + Writer write(Writer writer, int indentFactor, int indent) + throws JSONException { + try { + boolean commanate = false; + final int length = this.length(); + Iterator keys = this.keys(); + writer.write('{'); + + if (length == 1) { + Object key = keys.next(); + writer.write(quote(key.toString())); + writer.write(':'); + if (indentFactor > 0) { + writer.write(' '); + } + writeValue(writer, this.map.get(key), indentFactor, indent); + } else if (length != 0) { + final int newindent = indent + indentFactor; + while (keys.hasNext()) { + Object key = keys.next(); + if (commanate) { + writer.write(','); + } + if (indentFactor > 0) { + writer.write('\n'); + } + indent(writer, newindent); + writer.write(quote(key.toString())); + writer.write(':'); + if (indentFactor > 0) { + writer.write(' '); + } + writeValue(writer, this.map.get(key), indentFactor, newindent); + commanate = true; + } + if (indentFactor > 0) { + writer.write('\n'); + } + indent(writer, indent); + } + writer.write('}'); + return writer; + } catch (IOException exception) { + throw new JSONException(exception); + } + } +} From 31b8c63c3238ff1061fd202d951ee31035690e8f Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Sun, 16 Aug 2015 02:14:34 +0200 Subject: [PATCH 8/9] Added authorship information for easier detection of changes. --- bin/org/json/JSONObject.class | Bin 26910 -> 26910 bytes src/org/json/JSONObject.java | 7 +++++++ 2 files changed, 7 insertions(+) diff --git a/bin/org/json/JSONObject.class b/bin/org/json/JSONObject.class index c07e46f2e601c0e43979aa6b1f65e1c6a949642c..ce7be121034a3f7b998cccb6b05225acd463070d 100644 GIT binary patch delta 2102 zcmW+$c~qCj6}|J#%o~3EL=gOm5fl^`M8E|>Wl<3YWEZ3^4WLAXCZfbBqQ!#}V|v6b zPW70WDAC%cDm5)8YHhVrrAnev#C=JyrrU{WLuyQ-jeUo|-rRTZ_uhSP=6t)`#qM_T zercQtwui=r+4XU+c_KhgB>bHy1US(c=8VKBC)$RNYY>U7dC!xZ#Vq~-lDG26~Pu5gcb?$NwJwM=f4Pd9$^HZ$2yO#|D-d~5>Qfrq=Z{4_(_cb zNeGk%&q)_Tq&J30H%4=emp)cazT(r5)j{x)!SI&@*y1t~(LLZ#lQTuEy)%1&{XF@H zY13Gh3U8T)UNRj)aymxH48+PzOp{s2mDwnkIjE4iSRwPUR?fgynUA+*0S?HSXp)8a zM9#9|DT~AcyFH~qRN8;0Oc&KQW@@siv&*Mecs9UGHn5M4?0OS-*oeV$i|v|vKk99s z=^gmWJv_@k^p(Frgxrr9`AfvfUttQzEct8vNFG3`Y_cM?%ykTb0Q$hO^OHSxU23v8 zYg&-uk)NY&|BU@sJx3|@*Y?F3}a;{SG#YIq@5N2wuiGq?3?K^u4f0$QU^fcjXCr{6Jg>XKU^8-1*)HQ}t45P8#stFl+F5Z?(g_laR?(8u8LB=#u*j=+< zW{j(hxrMAQXZ0XklUb;jab~&A$O^SxnFV?+qk2XQ#1{Uhz_o{QBiDMDYrQBAbN>*# zJv%}36H_OfuVy!hx)x~F3V(GD1Jrp8*sqfiGi3hqX+`6+q?qew<& zI)P7#-Fa6*rp{!P#VE|y7A);w45drptLGy?mm*NVfH1uPLvJ_Y(-&}DU&J5uCHz@mMytMp3%UcB^ff%t*U_bK;5&U2&-5+PvyZ+ldh0tP zP~R27`luMHJ4K|vZ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+>D1-0JoAGb?eeq8OuwRuP z5Z%4Y{xC_Dd(hhSLO$T0noYx<+uL|~d3fO0bsl_m=Fxh^t; zu-ZhU#>C)#6N`^c9QK;Q9AgMaNWdjC49zAHH_Qk;F-dr4l7){+v3XOT_+>zwO!%4% zcFpomm^wyO6+xN_aG8l{Yo3SO6eG}-pr@IHfo3w|%!`OOrARU_A>T~FL^BnW%rumm z>6mF=MunMyd8Q0+m~t#Ov#`QcV6B;rYBL9$%&XX9=HfFmj{{D_QB#R}GaqNn0-Q68 TaK-!)SIJc2nptckrr-G={O=Gl diff --git a/src/org/json/JSONObject.java b/src/org/json/JSONObject.java index 6b95d59df..93806a826 100755 --- a/src/org/json/JSONObject.java +++ b/src/org/json/JSONObject.java @@ -534,6 +534,7 @@ public boolean getBoolean(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The truth. + * @author Lukas Rose, lukas.rose@gmx.de */ public boolean getBooleanSafe(String key, boolean defaultValue){ if (has(key)) try {return getBoolean(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -565,6 +566,7 @@ public BigInteger getBigInteger(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The numeric value. + * @author Lukas Rose, lukas.rose@gmx.de */ public BigInteger getBigIntegerSafe(String key, BigInteger defaultValue){ if (has(key)) try {return getBigInteger(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -596,6 +598,7 @@ public BigDecimal getBigDecimal(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The numeric value. + * @author Lukas Rose, lukas.rose@gmx.de */ public BigDecimal getBigDecimalSafe(String key, BigDecimal defaultValue){ if (has(key)) try {return getBigDecimal(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -628,6 +631,7 @@ public double getDouble(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The numeric value. + * @author Lukas Rose, lukas.rose@gmx.de */ public double getDoubleSafe(String key, double defaultValue){ if (has(key)) try {return getDouble(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -660,6 +664,7 @@ public int getInt(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The numeric value. + * @author Lukas Rose, lukas.rose@gmx.de */ public int getIntSafe(String key, int defaultValue){ if (has(key)) try {return getInt(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -728,6 +733,7 @@ public long getLong(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return The numeric value. + * @author Lukas Rose, lukas.rose@gmx.de */ public long getBigIntegerSafe(String key, long defaultValue){ if (has(key)) try {return getLong(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; @@ -798,6 +804,7 @@ public String getString(String key) throws JSONException { * @param key A key String. * @param defaultValue The value to return if the key doesn't exist or errors occur. * @return A string which is the value. + * @author Lukas Rose, lukas.rose@gmx.de */ public String getStringSafe(String key, String defaultValue){ if (has(key)) try {return getString(key);} catch (JSONException ex) {return defaultValue;} else return defaultValue; From 6811eb62bbd0e23acd62facb9704e769d72431e5 Mon Sep 17 00:00:00 2001 From: Lukas Rose Date: Tue, 18 Aug 2015 20:30:09 +0200 Subject: [PATCH 9/9] First Javadoc build --- doc/allclasses-frame.html | 35 + doc/allclasses-noframe.html | 35 + doc/constant-values.html | 189 ++ doc/deprecated-list.html | 122 + doc/help-doc.html | 223 ++ doc/index-files/index-1.html | 149 ++ doc/index-files/index-10.html | 137 + doc/index-files/index-11.html | 139 ++ doc/index-files/index-12.html | 144 ++ doc/index-files/index-13.html | 204 ++ doc/index-files/index-14.html | 275 +++ doc/index-files/index-15.html | 252 ++ doc/index-files/index-16.html | 140 ++ doc/index-files/index-17.html | 148 ++ doc/index-files/index-18.html | 163 ++ doc/index-files/index-19.html | 278 +++ doc/index-files/index-2.html | 133 + doc/index-files/index-20.html | 132 + doc/index-files/index-21.html | 146 ++ doc/index-files/index-22.html | 151 ++ doc/index-files/index-23.html | 141 ++ doc/index-files/index-3.html | 162 ++ doc/index-files/index-4.html | 133 + doc/index-files/index-5.html | 168 ++ doc/index-files/index-6.html | 262 ++ doc/index-files/index-7.html | 144 ++ doc/index-files/index-8.html | 144 ++ doc/index-files/index-9.html | 256 ++ doc/index.html | 71 + doc/org/json/CDL.html | 556 +++++ doc/org/json/Cookie.html | 383 +++ doc/org/json/CookieList.html | 323 +++ doc/org/json/HTTP.html | 396 +++ doc/org/json/HTTPTokener.html | 306 +++ doc/org/json/JSONArray.html | 1814 ++++++++++++++ doc/org/json/JSONException.html | 395 +++ doc/org/json/JSONML.html | 480 ++++ doc/org/json/JSONObject.Null.html | 336 +++ doc/org/json/JSONObject.html | 2470 +++++++++++++++++++ doc/org/json/JSONString.html | 234 ++ doc/org/json/JSONStringer.html | 344 +++ doc/org/json/JSONTokener.html | 793 ++++++ doc/org/json/JSONWriter.html | 752 ++++++ doc/org/json/Property.html | 313 +++ doc/org/json/XML.html | 633 +++++ doc/org/json/XMLTokener.html | 475 ++++ doc/org/json/class-use/CDL.html | 122 + doc/org/json/class-use/Cookie.html | 122 + doc/org/json/class-use/CookieList.html | 122 + doc/org/json/class-use/HTTP.html | 122 + doc/org/json/class-use/HTTPTokener.html | 122 + doc/org/json/class-use/JSONArray.html | 407 +++ doc/org/json/class-use/JSONException.html | 952 +++++++ doc/org/json/class-use/JSONML.html | 122 + doc/org/json/class-use/JSONObject.Null.html | 122 + doc/org/json/class-use/JSONObject.html | 403 +++ doc/org/json/class-use/JSONString.html | 122 + doc/org/json/class-use/JSONStringer.html | 122 + doc/org/json/class-use/JSONTokener.html | 219 ++ doc/org/json/class-use/JSONWriter.html | 226 ++ doc/org/json/class-use/Property.html | 122 + doc/org/json/class-use/XML.html | 122 + doc/org/json/class-use/XMLTokener.html | 173 ++ doc/org/json/package-frame.html | 42 + doc/org/json/package-summary.html | 272 ++ doc/org/json/package-tree.html | 168 ++ doc/org/json/package-use.html | 169 ++ doc/overview-tree.html | 172 ++ doc/package-list | 1 + doc/script.js | 30 + doc/serialized-form.html | 150 ++ doc/stylesheet.css | 574 +++++ 72 files changed, 20979 insertions(+) create mode 100644 doc/allclasses-frame.html create mode 100644 doc/allclasses-noframe.html create mode 100644 doc/constant-values.html create mode 100644 doc/deprecated-list.html create mode 100644 doc/help-doc.html create mode 100644 doc/index-files/index-1.html create mode 100644 doc/index-files/index-10.html create mode 100644 doc/index-files/index-11.html create mode 100644 doc/index-files/index-12.html create mode 100644 doc/index-files/index-13.html create mode 100644 doc/index-files/index-14.html create mode 100644 doc/index-files/index-15.html create mode 100644 doc/index-files/index-16.html create mode 100644 doc/index-files/index-17.html create mode 100644 doc/index-files/index-18.html create mode 100644 doc/index-files/index-19.html create mode 100644 doc/index-files/index-2.html create mode 100644 doc/index-files/index-20.html create mode 100644 doc/index-files/index-21.html create mode 100644 doc/index-files/index-22.html create mode 100644 doc/index-files/index-23.html create mode 100644 doc/index-files/index-3.html create mode 100644 doc/index-files/index-4.html create mode 100644 doc/index-files/index-5.html create mode 100644 doc/index-files/index-6.html create mode 100644 doc/index-files/index-7.html create mode 100644 doc/index-files/index-8.html create mode 100644 doc/index-files/index-9.html create mode 100644 doc/index.html create mode 100644 doc/org/json/CDL.html create mode 100644 doc/org/json/Cookie.html create mode 100644 doc/org/json/CookieList.html create mode 100644 doc/org/json/HTTP.html create mode 100644 doc/org/json/HTTPTokener.html create mode 100644 doc/org/json/JSONArray.html create mode 100644 doc/org/json/JSONException.html create mode 100644 doc/org/json/JSONML.html create mode 100644 doc/org/json/JSONObject.Null.html create mode 100644 doc/org/json/JSONObject.html create mode 100644 doc/org/json/JSONString.html create mode 100644 doc/org/json/JSONStringer.html create mode 100644 doc/org/json/JSONTokener.html create mode 100644 doc/org/json/JSONWriter.html create mode 100644 doc/org/json/Property.html create mode 100644 doc/org/json/XML.html create mode 100644 doc/org/json/XMLTokener.html create mode 100644 doc/org/json/class-use/CDL.html create mode 100644 doc/org/json/class-use/Cookie.html create mode 100644 doc/org/json/class-use/CookieList.html create mode 100644 doc/org/json/class-use/HTTP.html create mode 100644 doc/org/json/class-use/HTTPTokener.html create mode 100644 doc/org/json/class-use/JSONArray.html create mode 100644 doc/org/json/class-use/JSONException.html create mode 100644 doc/org/json/class-use/JSONML.html create mode 100644 doc/org/json/class-use/JSONObject.Null.html create mode 100644 doc/org/json/class-use/JSONObject.html create mode 100644 doc/org/json/class-use/JSONString.html create mode 100644 doc/org/json/class-use/JSONStringer.html create mode 100644 doc/org/json/class-use/JSONTokener.html create mode 100644 doc/org/json/class-use/JSONWriter.html create mode 100644 doc/org/json/class-use/Property.html create mode 100644 doc/org/json/class-use/XML.html create mode 100644 doc/org/json/class-use/XMLTokener.html create mode 100644 doc/org/json/package-frame.html create mode 100644 doc/org/json/package-summary.html create mode 100644 doc/org/json/package-tree.html create mode 100644 doc/org/json/package-use.html create mode 100644 doc/overview-tree.html create mode 100644 doc/package-list create mode 100644 doc/script.js create mode 100644 doc/serialized-form.html create mode 100644 doc/stylesheet.css diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html new file mode 100644 index 000000000..ac617f2ff --- /dev/null +++ b/doc/allclasses-frame.html @@ -0,0 +1,35 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html new file mode 100644 index 000000000..2fc332ce3 --- /dev/null +++ b/doc/allclasses-noframe.html @@ -0,0 +1,35 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/doc/constant-values.html b/doc/constant-values.html new file mode 100644 index 000000000..0374860e3 --- /dev/null +++ b/doc/constant-values.html @@ -0,0 +1,189 @@ + + + + + +Constant Field Values + + + + + + + + + + + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

org.json.*

+
    +
  • + + + + + + + + + + + + + + +
    org.json.HTTP 
    Modifier and TypeConstant FieldValue
    + +public static final java.lang.StringCRLF"\r\n"
    +
  • +
  • + + + + + + + + + + + + + + +
    org.json.JSONException 
    Modifier and TypeConstant FieldValue
    + +private static final longserialVersionUID0L
    +
  • +
  • + + + + + + + + + + + + + + +
    org.json.JSONWriter 
    Modifier and TypeConstant FieldValue
    + +private static final intmaxdepth200
    +
  • +
+
+ + + + + + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html new file mode 100644 index 000000000..97542cfc0 --- /dev/null +++ b/doc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/doc/help-doc.html b/doc/help-doc.html new file mode 100644 index 000000000..33d32c366 --- /dev/null +++ b/doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + + + + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ + + + + + diff --git a/doc/index-files/index-1.html b/doc/index-files/index-1.html new file mode 100644 index 000000000..95b310e87 --- /dev/null +++ b/doc/index-files/index-1.html @@ -0,0 +1,149 @@ + + + + + +A-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

A

+
+
accumulate(String, Object) - Method in class org.json.JSONObject
+
+
Accumulate values under a key.
+
+
AMP - Static variable in class org.json.XML
+
+
The Character '&'.
+
+
APOS - Static variable in class org.json.XML
+
+
The Character '''.
+
+
append(String, Object) - Method in class org.json.JSONObject
+
+
Append values to the array under a key.
+
+
append(String) - Method in class org.json.JSONWriter
+
+
Append a value.
+
+
array() - Method in class org.json.JSONWriter
+
+
Begin appending a new array.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-10.html b/doc/index-files/index-10.html new file mode 100644 index 000000000..e86e378fc --- /dev/null +++ b/doc/index-files/index-10.html @@ -0,0 +1,137 @@ + + + + + +K-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

K

+
+
key(String) - Method in class org.json.JSONWriter
+
+
Append a key.
+
+
keys() - Method in class org.json.JSONObject
+
+
Get an enumeration of the keys of the JSONObject.
+
+
keySet() - Method in class org.json.JSONObject
+
+
Get a set of keys of the JSONObject.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-11.html b/doc/index-files/index-11.html new file mode 100644 index 000000000..8b255a960 --- /dev/null +++ b/doc/index-files/index-11.html @@ -0,0 +1,139 @@ + + + + + +L-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

L

+
+
length() - Method in class org.json.JSONArray
+
+
Get the number of elements in the JSONArray, included nulls.
+
+
length() - Method in class org.json.JSONObject
+
+
Get the number of keys stored in the JSONObject.
+
+
line - Variable in class org.json.JSONTokener
+
 
+
LT - Static variable in class org.json.XML
+
+
The Character '<'.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-12.html b/doc/index-files/index-12.html new file mode 100644 index 000000000..cbe472d63 --- /dev/null +++ b/doc/index-files/index-12.html @@ -0,0 +1,144 @@ + + + + + +M-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

M

+
+
map - Variable in class org.json.JSONObject
+
+
The map where the JSONObject's properties are kept.
+
+
maxdepth - Static variable in class org.json.JSONWriter
+
 
+
mode - Variable in class org.json.JSONWriter
+
+
The current mode.
+
+
more() - Method in class org.json.JSONTokener
+
+
Determine if the source string still contains characters that next() + can consume.
+
+
myArrayList - Variable in class org.json.JSONArray
+
+
The arrayList where the JSONArray's properties are kept.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-13.html b/doc/index-files/index-13.html new file mode 100644 index 000000000..18a6c507b --- /dev/null +++ b/doc/index-files/index-13.html @@ -0,0 +1,204 @@ + + + + + +N-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

N

+
+
names() - Method in class org.json.JSONObject
+
+
Produce a JSONArray containing the names of the elements of this + JSONObject.
+
+
next() - Method in class org.json.JSONTokener
+
+
Get the next character in the source string.
+
+
next(char) - Method in class org.json.JSONTokener
+
+
Consume the next character, and check that it matches a specified + character.
+
+
next(int) - Method in class org.json.JSONTokener
+
+
Get the next n characters.
+
+
nextCDATA() - Method in class org.json.XMLTokener
+
+
Get the text in the CDATA block.
+
+
nextClean() - Method in class org.json.JSONTokener
+
+
Get the next char in the string, skipping whitespace.
+
+
nextContent() - Method in class org.json.XMLTokener
+
+
Get the next XML outer token, trimming whitespace.
+
+
nextEntity(char) - Method in class org.json.XMLTokener
+
+
Return the next entity.
+
+
nextMeta() - Method in class org.json.XMLTokener
+
+
Returns the next XML meta token.
+
+
nextString(char) - Method in class org.json.JSONTokener
+
+
Return the characters up to the next close quote character.
+
+
nextTo(char) - Method in class org.json.JSONTokener
+
+
Get the text up but not including the specified character or the + end of line, whichever comes first.
+
+
nextTo(String) - Method in class org.json.JSONTokener
+
+
Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
+
+
nextToken() - Method in class org.json.HTTPTokener
+
+
Get the next token or string.
+
+
nextToken() - Method in class org.json.XMLTokener
+
+
Get the next XML Token.
+
+
nextValue() - Method in class org.json.JSONTokener
+
+
Get the next value.
+
+
noSpace(String) - Static method in class org.json.XML
+
+
Throw an exception if the string contains whitespace.
+
+
NULL - Static variable in class org.json.JSONObject
+
+
It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value.
+
+
Null() - Constructor for class org.json.JSONObject.Null
+
 
+
numberToString(Number) - Static method in class org.json.JSONObject
+
+
Produce a string from a Number.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-14.html b/doc/index-files/index-14.html new file mode 100644 index 000000000..28385f1d6 --- /dev/null +++ b/doc/index-files/index-14.html @@ -0,0 +1,275 @@ + + + + + +O-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

O

+
+
object() - Method in class org.json.JSONWriter
+
+
Begin appending a new object.
+
+
opt(int) - Method in class org.json.JSONArray
+
+
Get the optional object value associated with an index.
+
+
opt(String) - Method in class org.json.JSONObject
+
+
Get an optional value associated with a key.
+
+
optBigDecimal(int, BigDecimal) - Method in class org.json.JSONArray
+
+
Get the optional BigDecimal value associated with an index.
+
+
optBigDecimal(String, BigDecimal) - Method in class org.json.JSONObject
+
+
Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optBigInteger(int, BigInteger) - Method in class org.json.JSONArray
+
+
Get the optional BigInteger value associated with an index.
+
+
optBigInteger(String, BigInteger) - Method in class org.json.JSONObject
+
+
Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optBoolean(int) - Method in class org.json.JSONArray
+
+
Get the optional boolean value associated with an index.
+
+
optBoolean(int, boolean) - Method in class org.json.JSONArray
+
+
Get the optional boolean value associated with an index.
+
+
optBoolean(String) - Method in class org.json.JSONObject
+
+
Get an optional boolean associated with a key.
+
+
optBoolean(String, boolean) - Method in class org.json.JSONObject
+
+
Get an optional boolean associated with a key.
+
+
optDouble(int) - Method in class org.json.JSONArray
+
+
Get the optional double value associated with an index.
+
+
optDouble(int, double) - Method in class org.json.JSONArray
+
+
Get the optional double value associated with an index.
+
+
optDouble(String) - Method in class org.json.JSONObject
+
+
Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number.
+
+
optDouble(String, double) - Method in class org.json.JSONObject
+
+
Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optEnum(Class<E>, int) - Method in class org.json.JSONArray
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, int, E) - Method in class org.json.JSONArray
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, String) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, String, E) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
optInt(int) - Method in class org.json.JSONArray
+
+
Get the optional int value associated with an index.
+
+
optInt(int, int) - Method in class org.json.JSONArray
+
+
Get the optional int value associated with an index.
+
+
optInt(String) - Method in class org.json.JSONObject
+
+
Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optInt(String, int) - Method in class org.json.JSONObject
+
+
Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optJSONArray(int) - Method in class org.json.JSONArray
+
+
Get the optional JSONArray associated with an index.
+
+
optJSONArray(String) - Method in class org.json.JSONObject
+
+
Get an optional JSONArray associated with a key.
+
+
optJSONObject(int) - Method in class org.json.JSONArray
+
+
Get the optional JSONObject associated with an index.
+
+
optJSONObject(String) - Method in class org.json.JSONObject
+
+
Get an optional JSONObject associated with a key.
+
+
optLong(int) - Method in class org.json.JSONArray
+
+
Get the optional long value associated with an index.
+
+
optLong(int, long) - Method in class org.json.JSONArray
+
+
Get the optional long value associated with an index.
+
+
optLong(String) - Method in class org.json.JSONObject
+
+
Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optLong(String, long) - Method in class org.json.JSONObject
+
+
Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optString(int) - Method in class org.json.JSONArray
+
+
Get the optional string value associated with an index.
+
+
optString(int, String) - Method in class org.json.JSONArray
+
+
Get the optional string associated with an index.
+
+
optString(String) - Method in class org.json.JSONObject
+
+
Get an optional string associated with a key.
+
+
optString(String, String) - Method in class org.json.JSONObject
+
+
Get an optional string associated with a key.
+
+
org.json - package org.json
+
 
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-15.html b/doc/index-files/index-15.html new file mode 100644 index 000000000..7a01e11f9 --- /dev/null +++ b/doc/index-files/index-15.html @@ -0,0 +1,252 @@ + + + + + +P-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

P

+
+
parse(XMLTokener, boolean, JSONArray) - Static method in class org.json.JSONML
+
+
Parse XML values and store them in a JSONArray.
+
+
parse(XMLTokener, JSONObject, String) - Static method in class org.json.XML
+
+
Scan the content following the named tag, attaching it to the context.
+
+
pop(char) - Method in class org.json.JSONWriter
+
+
Pop an array or object scope.
+
+
populateMap(Object) - Method in class org.json.JSONObject
+
 
+
previous - Variable in class org.json.JSONTokener
+
 
+
Property - Class in org.json
+
+
Converts a Property file data into JSONObject and back.
+
+
Property() - Constructor for class org.json.Property
+
 
+
push(JSONObject) - Method in class org.json.JSONWriter
+
+
Push an array or object scope.
+
+
put(boolean) - Method in class org.json.JSONArray
+
+
Append a boolean value.
+
+
put(Collection<Object>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
+
+
put(double) - Method in class org.json.JSONArray
+
+
Append a double value.
+
+
put(int) - Method in class org.json.JSONArray
+
+
Append an int value.
+
+
put(long) - Method in class org.json.JSONArray
+
+
Append an long value.
+
+
put(Map<String, Object>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
+
+
put(Object) - Method in class org.json.JSONArray
+
+
Append an object value.
+
+
put(int, boolean) - Method in class org.json.JSONArray
+
+
Put or replace a boolean value in the JSONArray.
+
+
put(int, Collection<Object>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
+
+
put(int, double) - Method in class org.json.JSONArray
+
+
Put or replace a double value.
+
+
put(int, int) - Method in class org.json.JSONArray
+
+
Put or replace an int value.
+
+
put(int, long) - Method in class org.json.JSONArray
+
+
Put or replace a long value.
+
+
put(int, Map<String, Object>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
+
+
put(int, Object) - Method in class org.json.JSONArray
+
+
Put or replace an object value in the JSONArray.
+
+
put(String, boolean) - Method in class org.json.JSONObject
+
+
Put a key/boolean pair in the JSONObject.
+
+
put(String, Collection<Object>) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
+
+
put(String, double) - Method in class org.json.JSONObject
+
+
Put a key/double pair in the JSONObject.
+
+
put(String, int) - Method in class org.json.JSONObject
+
+
Put a key/int pair in the JSONObject.
+
+
put(String, long) - Method in class org.json.JSONObject
+
+
Put a key/long pair in the JSONObject.
+
+
put(String, Map<String, Object>) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
+
+
put(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject.
+
+
putOnce(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
+
+
putOpt(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-16.html b/doc/index-files/index-16.html new file mode 100644 index 000000000..33ac5e4f2 --- /dev/null +++ b/doc/index-files/index-16.html @@ -0,0 +1,140 @@ + + + + + +Q-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

Q

+
+
QUEST - Static variable in class org.json.XML
+
+
The Character '?'.
+
+
QUOT - Static variable in class org.json.XML
+
+
The Character '"'.
+
+
quote(String) - Static method in class org.json.JSONObject
+
+
Produce a string in double quotes with backslash sequences in all the + right places.
+
+
quote(String, Writer) - Static method in class org.json.JSONObject
+
 
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-17.html b/doc/index-files/index-17.html new file mode 100644 index 000000000..229ea4af9 --- /dev/null +++ b/doc/index-files/index-17.html @@ -0,0 +1,148 @@ + + + + + +R-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

R

+
+
reader - Variable in class org.json.JSONTokener
+
 
+
remove(int) - Method in class org.json.JSONArray
+
+
Remove an index and close the hole.
+
+
remove(String) - Method in class org.json.JSONObject
+
+
Remove a name and its value, if present.
+
+
rowToJSONArray(JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of strings from a row of comma delimited values.
+
+
rowToJSONObject(JSONArray, JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
+
+
rowToString(JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text row from a JSONArray.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-18.html b/doc/index-files/index-18.html new file mode 100644 index 000000000..7238e2753 --- /dev/null +++ b/doc/index-files/index-18.html @@ -0,0 +1,163 @@ + + + + + +S-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

S

+
+
serialVersionUID - Static variable in exception org.json.JSONException
+
 
+
similar(Object) - Method in class org.json.JSONArray
+
+
Determine if two JSONArrays are similar.
+
+
similar(Object) - Method in class org.json.JSONObject
+
+
Determine if two JSONObjects are similar.
+
+
skipPast(String) - Method in class org.json.XMLTokener
+
+
Skip characters until past the requested string.
+
+
skipTo(char) - Method in class org.json.JSONTokener
+
+
Skip characters until the next character is the requested character.
+
+
SLASH - Static variable in class org.json.XML
+
+
The Character '/'.
+
+
stack - Variable in class org.json.JSONWriter
+
+
The object/array stack.
+
+
stringToValue(String) - Static method in class org.json.JSONObject
+
+
Try to convert a string into a number, boolean, or null.
+
+
stringToValue(String) - Static method in class org.json.XML
+
+
Try to convert a string into a number, boolean, or null.
+
+
syntaxError(String) - Method in class org.json.JSONTokener
+
+
Make a JSONException to signal a syntax error.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-19.html b/doc/index-files/index-19.html new file mode 100644 index 000000000..eebe388d5 --- /dev/null +++ b/doc/index-files/index-19.html @@ -0,0 +1,278 @@ + + + + + +T-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

T

+
+
testValidity(Object) - Static method in class org.json.JSONObject
+
+
Throw an exception if the object is a NaN or infinite number.
+
+
toJSONArray(String) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(JSONArray, String) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(JSONArray, JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(String) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(XMLTokener) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(JSONArray) - Method in class org.json.JSONObject
+
+
Produce a JSONArray containing the values of the members of this + JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.Cookie
+
+
Convert a cookie specification string into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.CookieList
+
+
Convert a cookie list into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.HTTP
+
+
Convert an HTTP header string into a JSONObject.
+
+
toJSONObject(JSONArray) - Method in class org.json.JSONArray
+
+
Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
+
+
toJSONObject(XMLTokener) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(String) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(Properties) - Static method in class org.json.Property
+
+
Converts a property file object into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
+
+
toJSONString() - Method in interface org.json.JSONString
+
+
The toJSONString method allows a class to produce its own JSON + serialization.
+
+
top - Variable in class org.json.JSONWriter
+
+
The stack top index.
+
+
toProperties(JSONObject) - Static method in class org.json.Property
+
+
Converts the JSONObject into a property file object.
+
+
toString(JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects.
+
+
toString(JSONArray, JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
+
+
toString(JSONObject) - Static method in class org.json.Cookie
+
+
Convert a JSONObject into a cookie specification string.
+
+
toString(JSONObject) - Static method in class org.json.CookieList
+
+
Convert a JSONObject into a cookie list.
+
+
toString(JSONObject) - Static method in class org.json.HTTP
+
+
Convert a JSONObject into an HTTP header.
+
+
toString() - Method in class org.json.JSONArray
+
+
Make a JSON text of this JSONArray.
+
+
toString(int) - Method in class org.json.JSONArray
+
+
Make a prettyprinted JSON text of this JSONArray.
+
+
toString(JSONArray) - Static method in class org.json.JSONML
+
+
Reverse the JSONML transformation, making an XML text from a JSONArray.
+
+
toString(JSONObject) - Static method in class org.json.JSONML
+
+
Reverse the JSONML transformation, making an XML text from a JSONObject.
+
+
toString() - Method in class org.json.JSONObject.Null
+
+
Get the "null" string value.
+
+
toString() - Method in class org.json.JSONObject
+
+
Make a JSON text of this JSONObject.
+
+
toString(int) - Method in class org.json.JSONObject
+
+
Make a prettyprinted JSON text of this JSONObject.
+
+
toString() - Method in class org.json.JSONStringer
+
+
Return the JSON text.
+
+
toString() - Method in class org.json.JSONTokener
+
+
Make a printable string of this JSONTokener.
+
+
toString(Object) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, element-normal XML string.
+
+
toString(Object, String) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, element-normal XML string.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-2.html b/doc/index-files/index-2.html new file mode 100644 index 000000000..f6beefe76 --- /dev/null +++ b/doc/index-files/index-2.html @@ -0,0 +1,133 @@ + + + + + +B-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

B

+
+
back() - Method in class org.json.JSONTokener
+
+
Back up one character.
+
+
BANG - Static variable in class org.json.XML
+
+
The Character '!'.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-20.html b/doc/index-files/index-20.html new file mode 100644 index 000000000..dd3a498b6 --- /dev/null +++ b/doc/index-files/index-20.html @@ -0,0 +1,132 @@ + + + + + +U-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

U

+
+
unescape(String) - Static method in class org.json.Cookie
+
+
Convert %hh sequences to single characters, and + convert plus to space.
+
+
usePrevious - Variable in class org.json.JSONTokener
+
 
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-21.html b/doc/index-files/index-21.html new file mode 100644 index 000000000..3207f5020 --- /dev/null +++ b/doc/index-files/index-21.html @@ -0,0 +1,146 @@ + + + + + +V-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

V

+
+
value(boolean) - Method in class org.json.JSONWriter
+
+
Append either the value true or the value + false.
+
+
value(double) - Method in class org.json.JSONWriter
+
+
Append a double value.
+
+
value(long) - Method in class org.json.JSONWriter
+
+
Append a long value.
+
+
value(Object) - Method in class org.json.JSONWriter
+
+
Append an object value.
+
+
valueToString(Object) - Static method in class org.json.JSONObject
+
+
Make a JSON text of an Object value.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-22.html b/doc/index-files/index-22.html new file mode 100644 index 000000000..b0ecb0a14 --- /dev/null +++ b/doc/index-files/index-22.html @@ -0,0 +1,151 @@ + + + + + +W-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

W

+
+
wrap(Object) - Static method in class org.json.JSONObject
+
+
Wrap an object, if necessary.
+
+
write(Writer) - Method in class org.json.JSONArray
+
+
Write the contents of the JSONArray as JSON text to a writer.
+
+
write(Writer, int, int) - Method in class org.json.JSONArray
+
+
Write the contents of the JSONArray as JSON text to a writer.
+
+
write(Writer) - Method in class org.json.JSONObject
+
+
Write the contents of the JSONObject as JSON text to a writer.
+
+
write(Writer, int, int) - Method in class org.json.JSONObject
+
+
Write the contents of the JSONObject as JSON text to a writer.
+
+
writer - Variable in class org.json.JSONWriter
+
+
The writer that will receive the output.
+
+
writeValue(Writer, Object, int, int) - Static method in class org.json.JSONObject
+
 
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-23.html b/doc/index-files/index-23.html new file mode 100644 index 000000000..849b5f9c1 --- /dev/null +++ b/doc/index-files/index-23.html @@ -0,0 +1,141 @@ + + + + + +X-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

X

+
+
XML - Class in org.json
+
+
This provides static methods to convert an XML text into a JSONObject, + and to covert a JSONObject into an XML text.
+
+
XML() - Constructor for class org.json.XML
+
 
+
XMLTokener - Class in org.json
+
+
The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
+
+
XMLTokener(String) - Constructor for class org.json.XMLTokener
+
+
Construct an XMLTokener from a string.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-3.html b/doc/index-files/index-3.html new file mode 100644 index 000000000..ebfb99a6a --- /dev/null +++ b/doc/index-files/index-3.html @@ -0,0 +1,162 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

C

+
+
cause - Variable in exception org.json.JSONException
+
 
+
CDL - Class in org.json
+
+
This provides static methods to convert comma delimited text into a + JSONArray, and to convert a JSONArray into comma delimited text.
+
+
CDL() - Constructor for class org.json.CDL
+
 
+
character - Variable in class org.json.JSONTokener
+
 
+
clone() - Method in class org.json.JSONObject.Null
+
+
There is only intended to be a single instance of the NULL object, + so the clone method returns itself.
+
+
comma - Variable in class org.json.JSONWriter
+
+
The comma flag determines if a comma should be output before the next + value.
+
+
Cookie - Class in org.json
+
+
Convert a web browser cookie specification to a JSONObject and back.
+
+
Cookie() - Constructor for class org.json.Cookie
+
 
+
CookieList - Class in org.json
+
+
Convert a web browser cookie list string to a JSONObject and back.
+
+
CookieList() - Constructor for class org.json.CookieList
+
 
+
CRLF - Static variable in class org.json.HTTP
+
+
Carriage return/line feed.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-4.html b/doc/index-files/index-4.html new file mode 100644 index 000000000..af4a21ea5 --- /dev/null +++ b/doc/index-files/index-4.html @@ -0,0 +1,133 @@ + + + + + +D-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

D

+
+
dehexchar(char) - Static method in class org.json.JSONTokener
+
+
Get the hex value of a character (base16).
+
+
doubleToString(double) - Static method in class org.json.JSONObject
+
+
Produce a string from a double.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-5.html b/doc/index-files/index-5.html new file mode 100644 index 000000000..54337b90e --- /dev/null +++ b/doc/index-files/index-5.html @@ -0,0 +1,168 @@ + + + + + +E-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

E

+
+
end() - Method in class org.json.JSONTokener
+
 
+
end(char, char) - Method in class org.json.JSONWriter
+
+
End something.
+
+
endArray() - Method in class org.json.JSONWriter
+
+
End an array.
+
+
endObject() - Method in class org.json.JSONWriter
+
+
End an object.
+
+
entity - Static variable in class org.json.XMLTokener
+
+
The table of entity values.
+
+
eof - Variable in class org.json.JSONTokener
+
 
+
EQ - Static variable in class org.json.XML
+
+
The Character '='.
+
+
equals(Object) - Method in class org.json.JSONObject.Null
+
+
A Null object is equal to the null value and to itself.
+
+
escape(String) - Static method in class org.json.Cookie
+
+
Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh".
+
+
escape(String) - Static method in class org.json.XML
+
+
Replace special characters with XML escapes: + + & (ampersand) is replaced by &amp; + < (less than) is replaced by &lt; + > (greater than) is replaced by &gt; + " (double quote) is replaced by &quot; +
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-6.html b/doc/index-files/index-6.html new file mode 100644 index 000000000..99999fa1c --- /dev/null +++ b/doc/index-files/index-6.html @@ -0,0 +1,262 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

G

+
+
get(int) - Method in class org.json.JSONArray
+
+
Get the object value associated with an index.
+
+
get(String) - Method in class org.json.JSONObject
+
+
Get the value object associated with a key.
+
+
getBigDecimal(int) - Method in class org.json.JSONArray
+
+
Get the BigDecimal value associated with an index.
+
+
getBigDecimal(String) - Method in class org.json.JSONObject
+
+
Get the BigDecimal value associated with a key.
+
+
getBigDecimalSafe(String, BigDecimal) - Method in class org.json.JSONObject
+
+
Get the BigDecimal value associated with a key.
+
+
getBigInteger(int) - Method in class org.json.JSONArray
+
+
Get the BigInteger value associated with an index.
+
+
getBigInteger(String) - Method in class org.json.JSONObject
+
+
Get the BigInteger value associated with a key.
+
+
getBigIntegerSafe(String, BigInteger) - Method in class org.json.JSONObject
+
+
Get the BigInteger value associated with a key.
+
+
getBigIntegerSafe(String, long) - Method in class org.json.JSONObject
+
+
Get the long value associated with a key.
+
+
getBoolean(int) - Method in class org.json.JSONArray
+
+
Get the boolean value associated with an index.
+
+
getBoolean(String) - Method in class org.json.JSONObject
+
+
Get the boolean value associated with a key.
+
+
getBooleanSafe(String, boolean) - Method in class org.json.JSONObject
+
+
Get the boolean associated with a key.
+
+
getCause() - Method in exception org.json.JSONException
+
+
Returns the cause of this exception or null if the cause is nonexistent + or unknown.
+
+
getDouble(int) - Method in class org.json.JSONArray
+
+
Get the double value associated with an index.
+
+
getDouble(String) - Method in class org.json.JSONObject
+
+
Get the double value associated with a key.
+
+
getDoubleSafe(String, double) - Method in class org.json.JSONObject
+
+
Get the double value associated with a key.
+
+
getEnum(Class<E>, int) - Method in class org.json.JSONArray
+
+
Get the enum value associated with an index.
+
+
getEnum(Class<E>, String) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
getInt(int) - Method in class org.json.JSONArray
+
+
Get the int value associated with an index.
+
+
getInt(String) - Method in class org.json.JSONObject
+
+
Get the int value associated with a key.
+
+
getIntSafe(String, int) - Method in class org.json.JSONObject
+
+
Get the int value associated with a key.
+
+
getJSONArray(int) - Method in class org.json.JSONArray
+
+
Get the JSONArray associated with an index.
+
+
getJSONArray(String) - Method in class org.json.JSONObject
+
+
Get the JSONArray value associated with a key.
+
+
getJSONObject(int) - Method in class org.json.JSONArray
+
+
Get the JSONObject associated with an index.
+
+
getJSONObject(String) - Method in class org.json.JSONObject
+
+
Get the JSONObject value associated with a key.
+
+
getLong(int) - Method in class org.json.JSONArray
+
+
Get the long value associated with an index.
+
+
getLong(String) - Method in class org.json.JSONObject
+
+
Get the long value associated with a key.
+
+
getNames(JSONObject) - Static method in class org.json.JSONObject
+
+
Get an array of field names from a JSONObject.
+
+
getNames(Object) - Static method in class org.json.JSONObject
+
+
Get an array of field names from an Object.
+
+
getString(int) - Method in class org.json.JSONArray
+
+
Get the string associated with an index.
+
+
getString(String) - Method in class org.json.JSONObject
+
+
Get the string associated with a key.
+
+
getStringSafe(String, String) - Method in class org.json.JSONObject
+
+
Get the string associated with a key.
+
+
getValue(JSONTokener) - Static method in class org.json.CDL
+
+
Get the next value.
+
+
GT - Static variable in class org.json.XML
+
+
The Character '>'.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-7.html b/doc/index-files/index-7.html new file mode 100644 index 000000000..4e76c5643 --- /dev/null +++ b/doc/index-files/index-7.html @@ -0,0 +1,144 @@ + + + + + +H-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

H

+
+
has(String) - Method in class org.json.JSONObject
+
+
Determine if the JSONObject contains a specific key.
+
+
HTTP - Class in org.json
+
+
Convert an HTTP header to a JSONObject and back.
+
+
HTTP() - Constructor for class org.json.HTTP
+
 
+
HTTPTokener - Class in org.json
+
+
The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
+
+
HTTPTokener(String) - Constructor for class org.json.HTTPTokener
+
+
Construct an HTTPTokener from a string.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-8.html b/doc/index-files/index-8.html new file mode 100644 index 000000000..4941a21c2 --- /dev/null +++ b/doc/index-files/index-8.html @@ -0,0 +1,144 @@ + + + + + +I-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

I

+
+
increment(String) - Method in class org.json.JSONObject
+
+
Increment a property of a JSONObject.
+
+
indent(Writer, int) - Static method in class org.json.JSONObject
+
 
+
index - Variable in class org.json.JSONTokener
+
 
+
isNull(int) - Method in class org.json.JSONArray
+
+
Determine if the value is null.
+
+
isNull(String) - Method in class org.json.JSONObject
+
+
Determine if the value associated with the key is null or if there is no + value.
+
+
iterator() - Method in class org.json.JSONArray
+
 
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-9.html b/doc/index-files/index-9.html new file mode 100644 index 000000000..159f7343a --- /dev/null +++ b/doc/index-files/index-9.html @@ -0,0 +1,256 @@ + + + + + +J-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E G H I J K L M N O P Q R S T U V W X  + + +

J

+
+
join(String) - Method in class org.json.JSONArray
+
+
Make a string from the contents of this JSONArray.
+
+
JSONArray - Class in org.json
+
+
A JSONArray is an ordered sequence of values.
+
+
JSONArray() - Constructor for class org.json.JSONArray
+
+
Construct an empty JSONArray.
+
+
JSONArray(JSONTokener) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a JSONTokener.
+
+
JSONArray(String) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a source JSON text.
+
+
JSONArray(Collection<Object>) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a Collection.
+
+
JSONArray(Object) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from an array
+
+
JSONException - Exception in org.json
+
+
The JSONException is thrown by the JSON.org classes when things are amiss.
+
+
JSONException(String) - Constructor for exception org.json.JSONException
+
+
Constructs a JSONException with an explanatory message.
+
+
JSONException(Throwable) - Constructor for exception org.json.JSONException
+
+
Constructs a new JSONException with the specified cause.
+
+
JSONML - Class in org.json
+
+
This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
+
+
JSONML() - Constructor for class org.json.JSONML
+
 
+
JSONObject - Class in org.json
+
+
A JSONObject is an unordered collection of name/value pairs.
+
+
JSONObject() - Constructor for class org.json.JSONObject
+
+
Construct an empty JSONObject.
+
+
JSONObject(JSONObject, String[]) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a subset of another JSONObject.
+
+
JSONObject(JSONTokener) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a JSONTokener.
+
+
JSONObject(Map<String, Object>) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a Map.
+
+
JSONObject(Object) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from an Object using bean getters.
+
+
JSONObject(Object, String[]) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from an Object, using reflection to find the + public members.
+
+
JSONObject(String) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a source JSON text string.
+
+
JSONObject(String, Locale) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a ResourceBundle.
+
+
JSONObject.Null - Class in org.json
+
+
JSONObject.NULL is equivalent to the value that JavaScript calls null, + whilst Java's null is equivalent to the value that JavaScript calls + undefined.
+
+
JSONString - Interface in org.json
+
+
The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object).
+
+
JSONStringer - Class in org.json
+
+
JSONStringer provides a quick and convenient way of producing JSON text.
+
+
JSONStringer() - Constructor for class org.json.JSONStringer
+
+
Make a fresh JSONStringer.
+
+
JSONTokener - Class in org.json
+
+
A JSONTokener takes a source string and extracts characters and tokens from + it.
+
+
JSONTokener(Reader) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from a Reader.
+
+
JSONTokener(InputStream) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from an InputStream.
+
+
JSONTokener(String) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from a string.
+
+
JSONWriter - Class in org.json
+
+
JSONWriter provides a quick and convenient way of producing JSON text.
+
+
JSONWriter(Writer) - Constructor for class org.json.JSONWriter
+
+
Make a fresh JSONWriter.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 000000000..4314a226f --- /dev/null +++ b/doc/index.html @@ -0,0 +1,71 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="org/json/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/org/json/CDL.html b/doc/org/json/CDL.html new file mode 100644 index 000000000..a68436da7 --- /dev/null +++ b/doc/org/json/CDL.html @@ -0,0 +1,556 @@ + + + + + +CDL + + + + + + + + + + + + +
+
org.json
+

Class CDL

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.CDL
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class CDL
    +extends java.lang.Object
    +
    This provides static methods to convert comma delimited text into a + JSONArray, and to convert a JSONArray into comma delimited text. Comma + delimited text is a very popular format for data interchange. It is + understood by most database, spreadsheet, and organizer programs. +

    + Each row of text represents a row in a table or a data record. Each row + ends with a NEWLINE character. Each row contains one or more values. + Values are separated by commas. A value can contain any character except + for comma, unless is is wrapped in single quotes or double quotes. +

    + The first row usually contains the names of the columns. +

    + A comma delimited list can be converted into a JSONArray of JSONObjects. + The names for the elements in the JSONObjects can be taken from the names + in the first row.

    +
    +
    Version:
    +
    2015-05-01
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CDL() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      private static java.lang.StringgetValue(JSONTokener x) +
      Get the next value.
      +
      static JSONArrayrowToJSONArray(JSONTokener x) +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      static JSONObjectrowToJSONObject(JSONArray names, + JSONTokener x) +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      static java.lang.StringrowToString(JSONArray ja) +
      Produce a comma delimited text row from a JSONArray.
      +
      static JSONArraytoJSONArray(JSONArray names, + JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArraytoJSONArray(JSONArray names, + java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArraytoJSONArray(JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static JSONArraytoJSONArray(java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static java.lang.StringtoString(JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects.
      +
      static java.lang.StringtoString(JSONArray names, + JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CDL

        +
        public CDL()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getValue

        +
        private static java.lang.String getValue(JSONTokener x)
        +                                  throws JSONException
        +
        Get the next value. The value can be wrapped in quotes. The value can + be empty.
        +
        +
        Parameters:
        +
        x - A JSONTokener of the source text.
        +
        Returns:
        +
        The value string, or null if empty.
        +
        Throws:
        +
        JSONException - if the quoted string is badly formed.
        +
        +
      • +
      + + + +
        +
      • +

        rowToJSONArray

        +
        public static JSONArray rowToJSONArray(JSONTokener x)
        +                                throws JSONException
        +
        Produce a JSONArray of strings from a row of comma delimited values.
        +
        +
        Parameters:
        +
        x - A JSONTokener of the source text.
        +
        Returns:
        +
        A JSONArray of strings.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        rowToJSONObject

        +
        public static JSONObject rowToJSONObject(JSONArray names,
        +                                         JSONTokener x)
        +                                  throws JSONException
        +
        Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
        +
        +
        Parameters:
        +
        names - A JSONArray of names. This is commonly obtained from the + first row of a comma delimited text file using the rowToJSONArray + method.
        +
        x - A JSONTokener of the source text.
        +
        Returns:
        +
        A JSONObject combining the names and values.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        rowToString

        +
        public static java.lang.String rowToString(JSONArray ja)
        +
        Produce a comma delimited text row from a JSONArray. Values containing + the comma character will be quoted. Troublesome characters may be + removed.
        +
        +
        Parameters:
        +
        ja - A JSONArray of strings.
        +
        Returns:
        +
        A string ending in NEWLINE.
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(java.lang.String string)
        +                             throws JSONException
        +
        Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
        +
        +
        Parameters:
        +
        string - The comma delimited text.
        +
        Returns:
        +
        A JSONArray of JSONObjects.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(JSONTokener x)
        +                             throws JSONException
        +
        Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
        +
        +
        Parameters:
        +
        x - The JSONTokener containing the comma delimited text.
        +
        Returns:
        +
        A JSONArray of JSONObjects.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(JSONArray names,
        +                                    java.lang.String string)
        +                             throws JSONException
        +
        Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
        +
        +
        Parameters:
        +
        names - A JSONArray of strings.
        +
        string - The comma delimited text.
        +
        Returns:
        +
        A JSONArray of JSONObjects.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(JSONArray names,
        +                                    JSONTokener x)
        +                             throws JSONException
        +
        Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
        +
        +
        Parameters:
        +
        names - A JSONArray of strings.
        +
        x - A JSONTokener of the source text.
        +
        Returns:
        +
        A JSONArray of JSONObjects.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONArray ja)
        +                                 throws JSONException
        +
        Produce a comma delimited text from a JSONArray of JSONObjects. The + first row will be a list of names obtained by inspecting the first + JSONObject.
        +
        +
        Parameters:
        +
        ja - A JSONArray of JSONObjects.
        +
        Returns:
        +
        A comma delimited text.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONArray names,
        +                                        JSONArray ja)
        +                                 throws JSONException
        +
        Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names. The list of names is not included in the + output.
        +
        +
        Parameters:
        +
        names - A JSONArray of strings.
        +
        ja - A JSONArray of JSONObjects.
        +
        Returns:
        +
        A comma delimited text.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/Cookie.html b/doc/org/json/Cookie.html new file mode 100644 index 000000000..d8b6f1310 --- /dev/null +++ b/doc/org/json/Cookie.html @@ -0,0 +1,383 @@ + + + + + +Cookie + + + + + + + + + + + + +
+
org.json
+

Class Cookie

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.Cookie
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Cookie
    +extends java.lang.Object
    +
    Convert a web browser cookie specification to a JSONObject and back. + JSON and Cookies are both notations for name/value pairs.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Cookie() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.lang.Stringescape(java.lang.String string) +
      Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh".
      +
      static JSONObjecttoJSONObject(java.lang.String string) +
      Convert a cookie specification string into a JSONObject.
      +
      static java.lang.StringtoString(JSONObject jo) +
      Convert a JSONObject into a cookie specification string.
      +
      static java.lang.Stringunescape(java.lang.String string) +
      Convert %hh sequences to single characters, and + convert plus to space.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Cookie

        +
        public Cookie()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        escape

        +
        public static java.lang.String escape(java.lang.String string)
        +
        Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh". This is a gentle form + of URL encoding, attempting to cause as little distortion to the + string as possible. The characters '=' and ';' are meta characters in + cookies. By convention, they are escaped using the URL-encoding. This is + only a convention, not a standard. Often, cookies are expected to have + encoded values. We encode '=' and ';' because we must. We encode '%' and + '+' because they are meta characters in URL encoding.
        +
        +
        Parameters:
        +
        string - The source string.
        +
        Returns:
        +
        The escaped result.
        +
        +
      • +
      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.lang.String string)
        +                               throws JSONException
        +
        Convert a cookie specification string into a JSONObject. The string + will contain a name value pair separated by '='. The name and the value + will be unescaped, possibly converting '+' and '%' sequences. The + cookie properties may follow, separated by ';', also represented as + name=value (except the secure property, which does not have a value). + The name will be stored under the key "name", and the value will be + stored under the key "value". This method does not do checking or + validation of the parameters. It only converts the cookie string into + a JSONObject.
        +
        +
        Parameters:
        +
        string - The cookie specification string.
        +
        Returns:
        +
        A JSONObject containing "name", "value", and possibly other + members.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONObject jo)
        +                                 throws JSONException
        +
        Convert a JSONObject into a cookie specification string. The JSONObject + must contain "name" and "value" members. + If the JSONObject contains "expires", "domain", "path", or "secure" + members, they will be appended to the cookie specification string. + All other members are ignored.
        +
        +
        Parameters:
        +
        jo - A JSONObject
        +
        Returns:
        +
        A cookie specification string
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        unescape

        +
        public static java.lang.String unescape(java.lang.String string)
        +
        Convert %hh sequences to single characters, and + convert plus to space.
        +
        +
        Parameters:
        +
        string - A string that may contain + + (plus) and + %hh sequences.
        +
        Returns:
        +
        The unescaped string.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/CookieList.html b/doc/org/json/CookieList.html new file mode 100644 index 000000000..d34f5297b --- /dev/null +++ b/doc/org/json/CookieList.html @@ -0,0 +1,323 @@ + + + + + +CookieList + + + + + + + + + + + + +
+
org.json
+

Class CookieList

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.CookieList
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class CookieList
    +extends java.lang.Object
    +
    Convert a web browser cookie list string to a JSONObject and back.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CookieList() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static JSONObjecttoJSONObject(java.lang.String string) +
      Convert a cookie list into a JSONObject.
      +
      static java.lang.StringtoString(JSONObject jo) +
      Convert a JSONObject into a cookie list.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CookieList

        +
        public CookieList()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.lang.String string)
        +                               throws JSONException
        +
        Convert a cookie list into a JSONObject. A cookie list is a sequence + of name/value pairs. The names are separated from the values by '='. + The pairs are separated by ';'. The names and the values + will be unescaped, possibly converting '+' and '%' sequences. + + To add a cookie to a cooklist, + cookielistJSONObject.put(cookieJSONObject.getString("name"), + cookieJSONObject.getString("value"));
        +
        +
        Parameters:
        +
        string - A cookie list string
        +
        Returns:
        +
        A JSONObject
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONObject jo)
        +                                 throws JSONException
        +
        Convert a JSONObject into a cookie list. A cookie list is a sequence + of name/value pairs. The names are separated from the values by '='. + The pairs are separated by ';'. The characters '%', '+', '=', and ';' + in the names and values are replaced by "%hh".
        +
        +
        Parameters:
        +
        jo - A JSONObject
        +
        Returns:
        +
        A cookie list string
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/HTTP.html b/doc/org/json/HTTP.html new file mode 100644 index 000000000..85a5ddfca --- /dev/null +++ b/doc/org/json/HTTP.html @@ -0,0 +1,396 @@ + + + + + +HTTP + + + + + + + + + + + + +
+
org.json
+

Class HTTP

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.HTTP
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class HTTP
    +extends java.lang.Object
    +
    Convert an HTTP header to a JSONObject and back.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static java.lang.StringCRLF +
      Carriage return/line feed.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      HTTP() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static JSONObjecttoJSONObject(java.lang.String string) +
      Convert an HTTP header string into a JSONObject.
      +
      static java.lang.StringtoString(JSONObject jo) +
      Convert a JSONObject into an HTTP header.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        CRLF

        +
        public static final java.lang.String CRLF
        +
        Carriage return/line feed.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HTTP

        +
        public HTTP()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.lang.String string)
        +                               throws JSONException
        +
        Convert an HTTP header string into a JSONObject. It can be a request + header or a response header. A request header will contain +
        {
        +    Method: "POST" (for example),
        +    "Request-URI": "/" (for example),
        +    "HTTP-Version": "HTTP/1.1" (for example)
        + }
        + A response header will contain +
        {
        +    "HTTP-Version": "HTTP/1.1" (for example),
        +    "Status-Code": "200" (for example),
        +    "Reason-Phrase": "OK" (for example)
        + }
        + In addition, the other parameters in the header will be captured, using + the HTTP field names as JSON names, so that
        +    Date: Sun, 26 May 2002 18:06:04 GMT
        +    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
        +    Cache-Control: no-cache
        + become +
        {...
        +    Date: "Sun, 26 May 2002 18:06:04 GMT",
        +    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
        +    "Cache-Control": "no-cache",
        + ...}
        + It does no further checking or conversion. It does not parse dates. + It does not do '%' transforms on URLs.
        +
        +
        Parameters:
        +
        string - An HTTP header string.
        +
        Returns:
        +
        A JSONObject containing the elements and attributes + of the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONObject jo)
        +                                 throws JSONException
        +
        Convert a JSONObject into an HTTP header. A request header must contain +
        {
        +    Method: "POST" (for example),
        +    "Request-URI": "/" (for example),
        +    "HTTP-Version": "HTTP/1.1" (for example)
        + }
        + A response header must contain +
        {
        +    "HTTP-Version": "HTTP/1.1" (for example),
        +    "Status-Code": "200" (for example),
        +    "Reason-Phrase": "OK" (for example)
        + }
        + Any other members of the JSONObject will be output as HTTP fields. + The result will end with two CRLF pairs.
        +
        +
        Parameters:
        +
        jo - A JSONObject
        +
        Returns:
        +
        An HTTP header string.
        +
        Throws:
        +
        JSONException - if the object does not contain enough + information.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/HTTPTokener.html b/doc/org/json/HTTPTokener.html new file mode 100644 index 000000000..12bd680bd --- /dev/null +++ b/doc/org/json/HTTPTokener.html @@ -0,0 +1,306 @@ + + + + + +HTTPTokener + + + + + + + + + + + + +
+
org.json
+

Class HTTPTokener

+
+
+ +
+
    +
  • +
    +
    +
    public class HTTPTokener
    +extends JSONTokener
    +
    The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HTTPTokener

        +
        public HTTPTokener(java.lang.String string)
        +
        Construct an HTTPTokener from a string.
        +
        +
        Parameters:
        +
        string - A source string.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        nextToken

        +
        public java.lang.String nextToken()
        +                           throws JSONException
        +
        Get the next token or string. This is used in parsing HTTP headers.
        +
        +
        Returns:
        +
        A String.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONArray.html b/doc/org/json/JSONArray.html new file mode 100644 index 000000000..60e4e5e5f --- /dev/null +++ b/doc/org/json/JSONArray.html @@ -0,0 +1,1814 @@ + + + + + +JSONArray + + + + + + + + + + + + +
+
org.json
+

Class JSONArray

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONArray
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Iterable<java.lang.Object>
    +
    +
    +
    +
    public class JSONArray
    +extends java.lang.Object
    +implements java.lang.Iterable<java.lang.Object>
    +
    A JSONArray is an ordered sequence of values. Its external text form is a + string wrapped in square brackets with commas separating the values. The + internal form is an object having get and opt + methods for accessing the values by index, and put methods for + adding or replacing values. The values can be any of these types: + Boolean, JSONArray, JSONObject, + Number, String, or the + JSONObject.NULL object. +

    + The constructor can convert a JSON text into a Java object. The + toString method converts to JSON text. +

    + A get method returns a value if one can be found, and throws an + exception if one cannot be found. An opt method returns a + default value instead of throwing an exception, and so is useful for + obtaining optional values. +

    + The generic get() and opt() methods return an + object which you can cast or query for type. There are also typed + get and opt methods that do type checking and type + coercion for you. +

    + The texts produced by the toString methods strictly conform to + JSON syntax rules. The constructors are more forgiving in the texts they will + accept: +

      +
    • An extra , (comma) may appear just + before the closing bracket.
    • +
    • The null value will be inserted when there is , +  (comma) elision.
    • +
    • Strings may be quoted with ' (single + quote).
    • +
    • Strings do not need to be quoted at all if they do not begin with a quote + or single quote, and if they do not contain leading or trailing spaces, and + if they do not contain any of these characters: + { } [ ] / \ : , # and if they do not look like numbers and + if they are not the reserved words true, false, or + null.
    • +
    +
    +
    Version:
    +
    2015-07-22
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private java.util.ArrayList<java.lang.Object>myArrayList +
      The arrayList where the JSONArray's properties are kept.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONArray() +
      Construct an empty JSONArray.
      +
      JSONArray(java.util.Collection<java.lang.Object> collection) +
      Construct a JSONArray from a Collection.
      +
      JSONArray(JSONTokener x) +
      Construct a JSONArray from a JSONTokener.
      +
      JSONArray(java.lang.Object array) +
      Construct a JSONArray from an array
      +
      JSONArray(java.lang.String source) +
      Construct a JSONArray from a source JSON text.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.Objectget(int index) +
      Get the object value associated with an index.
      +
      java.math.BigDecimalgetBigDecimal(int index) +
      Get the BigDecimal value associated with an index.
      +
      java.math.BigIntegergetBigInteger(int index) +
      Get the BigInteger value associated with an index.
      +
      booleangetBoolean(int index) +
      Get the boolean value associated with an index.
      +
      doublegetDouble(int index) +
      Get the double value associated with an index.
      +
      <E extends java.lang.Enum<E>>
      E
      getEnum(java.lang.Class<E> clazz, + int index) +
      Get the enum value associated with an index.
      +
      intgetInt(int index) +
      Get the int value associated with an index.
      +
      JSONArraygetJSONArray(int index) +
      Get the JSONArray associated with an index.
      +
      JSONObjectgetJSONObject(int index) +
      Get the JSONObject associated with an index.
      +
      longgetLong(int index) +
      Get the long value associated with an index.
      +
      java.lang.StringgetString(int index) +
      Get the string associated with an index.
      +
      booleanisNull(int index) +
      Determine if the value is null.
      +
      java.util.Iterator<java.lang.Object>iterator() 
      java.lang.Stringjoin(java.lang.String separator) +
      Make a string from the contents of this JSONArray.
      +
      intlength() +
      Get the number of elements in the JSONArray, included nulls.
      +
      java.lang.Objectopt(int index) +
      Get the optional object value associated with an index.
      +
      java.math.BigDecimaloptBigDecimal(int index, + java.math.BigDecimal defaultValue) +
      Get the optional BigDecimal value associated with an index.
      +
      java.math.BigIntegeroptBigInteger(int index, + java.math.BigInteger defaultValue) +
      Get the optional BigInteger value associated with an index.
      +
      booleanoptBoolean(int index) +
      Get the optional boolean value associated with an index.
      +
      booleanoptBoolean(int index, + boolean defaultValue) +
      Get the optional boolean value associated with an index.
      +
      doubleoptDouble(int index) +
      Get the optional double value associated with an index.
      +
      doubleoptDouble(int index, + double defaultValue) +
      Get the optional double value associated with an index.
      +
      <E extends java.lang.Enum<E>>
      E
      optEnum(java.lang.Class<E> clazz, + int index) +
      Get the enum value associated with a key.
      +
      <E extends java.lang.Enum<E>>
      E
      optEnum(java.lang.Class<E> clazz, + int index, + E defaultValue) +
      Get the enum value associated with a key.
      +
      intoptInt(int index) +
      Get the optional int value associated with an index.
      +
      intoptInt(int index, + int defaultValue) +
      Get the optional int value associated with an index.
      +
      JSONArrayoptJSONArray(int index) +
      Get the optional JSONArray associated with an index.
      +
      JSONObjectoptJSONObject(int index) +
      Get the optional JSONObject associated with an index.
      +
      longoptLong(int index) +
      Get the optional long value associated with an index.
      +
      longoptLong(int index, + long defaultValue) +
      Get the optional long value associated with an index.
      +
      java.lang.StringoptString(int index) +
      Get the optional string value associated with an index.
      +
      java.lang.StringoptString(int index, + java.lang.String defaultValue) +
      Get the optional string associated with an index.
      +
      JSONArrayput(boolean value) +
      Append a boolean value.
      +
      JSONArrayput(java.util.Collection<java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      JSONArrayput(double value) +
      Append a double value.
      +
      JSONArrayput(int value) +
      Append an int value.
      +
      JSONArrayput(int index, + boolean value) +
      Put or replace a boolean value in the JSONArray.
      +
      JSONArrayput(int index, + java.util.Collection<java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      JSONArrayput(int index, + double value) +
      Put or replace a double value.
      +
      JSONArrayput(int index, + int value) +
      Put or replace an int value.
      +
      JSONArrayput(int index, + long value) +
      Put or replace a long value.
      +
      JSONArrayput(int index, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
      +
      JSONArrayput(int index, + java.lang.Object value) +
      Put or replace an object value in the JSONArray.
      +
      JSONArrayput(long value) +
      Append an long value.
      +
      JSONArrayput(java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
      +
      JSONArrayput(java.lang.Object value) +
      Append an object value.
      +
      java.lang.Objectremove(int index) +
      Remove an index and close the hole.
      +
      booleansimilar(java.lang.Object other) +
      Determine if two JSONArrays are similar.
      +
      JSONObjecttoJSONObject(JSONArray names) +
      Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
      +
      java.lang.StringtoString() +
      Make a JSON text of this JSONArray.
      +
      java.lang.StringtoString(int indentFactor) +
      Make a prettyprinted JSON text of this JSONArray.
      +
      java.io.Writerwrite(java.io.Writer writer) +
      Write the contents of the JSONArray as JSON text to a writer.
      +
      (package private) java.io.Writerwrite(java.io.Writer writer, + int indentFactor, + int indent) +
      Write the contents of the JSONArray as JSON text to a writer.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
        +
      • + + +

        Methods inherited from interface java.lang.Iterable

        +forEach, spliterator
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        myArrayList

        +
        private final java.util.ArrayList<java.lang.Object> myArrayList
        +
        The arrayList where the JSONArray's properties are kept.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONArray

        +
        public JSONArray()
        +
        Construct an empty JSONArray.
        +
      • +
      + + + +
        +
      • +

        JSONArray

        +
        public JSONArray(JSONTokener x)
        +          throws JSONException
        +
        Construct a JSONArray from a JSONTokener.
        +
        +
        Parameters:
        +
        x - A JSONTokener
        +
        Throws:
        +
        JSONException - If there is a syntax error.
        +
        +
      • +
      + + + +
        +
      • +

        JSONArray

        +
        public JSONArray(java.lang.String source)
        +          throws JSONException
        +
        Construct a JSONArray from a source JSON text.
        +
        +
        Parameters:
        +
        source - A string that begins with [ (left + bracket) and ends with ] +  (right bracket).
        +
        Throws:
        +
        JSONException - If there is a syntax error.
        +
        +
      • +
      + + + +
        +
      • +

        JSONArray

        +
        public JSONArray(java.util.Collection<java.lang.Object> collection)
        +
        Construct a JSONArray from a Collection.
        +
        +
        Parameters:
        +
        collection - A Collection.
        +
        +
      • +
      + + + +
        +
      • +

        JSONArray

        +
        public JSONArray(java.lang.Object array)
        +          throws JSONException
        +
        Construct a JSONArray from an array
        +
        +
        Throws:
        +
        JSONException - If not an array.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        iterator

        +
        public java.util.Iterator<java.lang.Object> iterator()
        +
        +
        Specified by:
        +
        iterator in interface java.lang.Iterable<java.lang.Object>
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public java.lang.Object get(int index)
        +                     throws JSONException
        +
        Get the object value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        An object value.
        +
        Throws:
        +
        JSONException - If there is no value for the index.
        +
        +
      • +
      + + + +
        +
      • +

        getBoolean

        +
        public boolean getBoolean(int index)
        +                   throws JSONException
        +
        Get the boolean value associated with an index. The string values "true" + and "false" are converted to boolean.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The truth.
        +
        Throws:
        +
        JSONException - If there is no value for the index or if the value is not + convertible to boolean.
        +
        +
      • +
      + + + +
        +
      • +

        getDouble

        +
        public double getDouble(int index)
        +                 throws JSONException
        +
        Get the double value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        Throws:
        +
        JSONException - If the key is not found or if the value cannot be converted + to a number.
        +
        +
      • +
      + + + +
        +
      • +

        getEnum

        +
        public <E extends java.lang.Enum<E>> E getEnum(java.lang.Class<E> clazz,
        +                                               int index)
        +                                        throws JSONException
        +
        Get the enum value associated with an index.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The enum value at the index location
        +
        Throws:
        +
        JSONException - if the key is not found or if the value cannot be converted + to an enum.
        +
        +
      • +
      + + + +
        +
      • +

        getBigDecimal

        +
        public java.math.BigDecimal getBigDecimal(int index)
        +                                   throws JSONException
        +
        Get the BigDecimal value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        Throws:
        +
        JSONException - If the key is not found or if the value cannot be converted + to a BigDecimal.
        +
        +
      • +
      + + + +
        +
      • +

        getBigInteger

        +
        public java.math.BigInteger getBigInteger(int index)
        +                                   throws JSONException
        +
        Get the BigInteger value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        Throws:
        +
        JSONException - If the key is not found or if the value cannot be converted + to a BigInteger.
        +
        +
      • +
      + + + +
        +
      • +

        getInt

        +
        public int getInt(int index)
        +           throws JSONException
        +
        Get the int value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        Throws:
        +
        JSONException - If the key is not found or if the value is not a number.
        +
        +
      • +
      + + + +
        +
      • +

        getJSONArray

        +
        public JSONArray getJSONArray(int index)
        +                       throws JSONException
        +
        Get the JSONArray associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        A JSONArray value.
        +
        Throws:
        +
        JSONException - If there is no value for the index. or if the value is not a + JSONArray
        +
        +
      • +
      + + + +
        +
      • +

        getJSONObject

        +
        public JSONObject getJSONObject(int index)
        +                         throws JSONException
        +
        Get the JSONObject associated with an index.
        +
        +
        Parameters:
        +
        index - subscript
        +
        Returns:
        +
        A JSONObject value.
        +
        Throws:
        +
        JSONException - If there is no value for the index or if the value is not a + JSONObject
        +
        +
      • +
      + + + +
        +
      • +

        getLong

        +
        public long getLong(int index)
        +             throws JSONException
        +
        Get the long value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        Throws:
        +
        JSONException - If the key is not found or if the value cannot be converted + to a number.
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString(int index)
        +                           throws JSONException
        +
        Get the string associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        A string value.
        +
        Throws:
        +
        JSONException - If there is no string value for the index.
        +
        +
      • +
      + + + +
        +
      • +

        isNull

        +
        public boolean isNull(int index)
        +
        Determine if the value is null.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        true if the value at the index is null, or if there is no value.
        +
        +
      • +
      + + + +
        +
      • +

        join

        +
        public java.lang.String join(java.lang.String separator)
        +                      throws JSONException
        +
        Make a string from the contents of this JSONArray. The + separator string is inserted between each element. Warning: + This method assumes that the data structure is acyclical.
        +
        +
        Parameters:
        +
        separator - A string that will be inserted between the elements.
        +
        Returns:
        +
        a string.
        +
        Throws:
        +
        JSONException - If the array contains an invalid number.
        +
        +
      • +
      + + + +
        +
      • +

        length

        +
        public int length()
        +
        Get the number of elements in the JSONArray, included nulls.
        +
        +
        Returns:
        +
        The length (or size).
        +
        +
      • +
      + + + +
        +
      • +

        opt

        +
        public java.lang.Object opt(int index)
        +
        Get the optional object value associated with an index.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        An object value, or null if there is no object at that index.
        +
        +
      • +
      + + + +
        +
      • +

        optBoolean

        +
        public boolean optBoolean(int index)
        +
        Get the optional boolean value associated with an index. It returns false + if there is no value at that index, or if the value is not Boolean.TRUE + or the String "true".
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The truth.
        +
        +
      • +
      + + + +
        +
      • +

        optBoolean

        +
        public boolean optBoolean(int index,
        +                          boolean defaultValue)
        +
        Get the optional boolean value associated with an index. It returns the + defaultValue if there is no value at that index or if it is not a Boolean + or the String "true" or "false" (case insensitive).
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - A boolean default.
        +
        Returns:
        +
        The truth.
        +
        +
      • +
      + + + +
        +
      • +

        optDouble

        +
        public double optDouble(int index)
        +
        Get the optional double value associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optDouble

        +
        public double optDouble(int index,
        +                        double defaultValue)
        +
        Get the optional double value associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - subscript
        +
        defaultValue - The default value.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optInt

        +
        public int optInt(int index)
        +
        Get the optional int value associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optInt

        +
        public int optInt(int index,
        +                  int defaultValue)
        +
        Get the optional int value associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default value.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optEnum

        +
        public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz,
        +                                               int index)
        +
        Get the enum value associated with a key.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The enum value at the index location or null if not found
        +
        +
      • +
      + + + + + +
        +
      • +

        optEnum

        +
        public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz,
        +                                               int index,
        +                                               E defaultValue)
        +
        Get the enum value associated with a key.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default in case the value is not found
        +
        Returns:
        +
        The enum value at the index location or defaultValue if + the value is not found or cannot be assigned to clazz
        +
        +
      • +
      + + + +
        +
      • +

        optBigInteger

        +
        public java.math.BigInteger optBigInteger(int index,
        +                                          java.math.BigInteger defaultValue)
        +
        Get the optional BigInteger value associated with an index. The + defaultValue is returned if there is no value for the index, or if the + value is not a number and cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default value.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optBigDecimal

        +
        public java.math.BigDecimal optBigDecimal(int index,
        +                                          java.math.BigDecimal defaultValue)
        +
        Get the optional BigDecimal value associated with an index. The + defaultValue is returned if there is no value for the index, or if the + value is not a number and cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default value.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optJSONArray

        +
        public JSONArray optJSONArray(int index)
        +
        Get the optional JSONArray associated with an index.
        +
        +
        Parameters:
        +
        index - subscript
        +
        Returns:
        +
        A JSONArray value, or null if the index has no value, or if the + value is not a JSONArray.
        +
        +
      • +
      + + + +
        +
      • +

        optJSONObject

        +
        public JSONObject optJSONObject(int index)
        +
        Get the optional JSONObject associated with an index. Null is returned if + the key is not found, or null if the index has no value, or if the value + is not a JSONObject.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        A JSONObject value.
        +
        +
      • +
      + + + +
        +
      • +

        optLong

        +
        public long optLong(int index)
        +
        Get the optional long value associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optLong

        +
        public long optLong(int index,
        +                    long defaultValue)
        +
        Get the optional long value associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default value.
        +
        Returns:
        +
        The value.
        +
        +
      • +
      + + + +
        +
      • +

        optString

        +
        public java.lang.String optString(int index)
        +
        Get the optional string value associated with an index. It returns an + empty string if there is no value at that index. If the value is not a + string and is not null, then it is coverted to a string.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        Returns:
        +
        A String value.
        +
        +
      • +
      + + + +
        +
      • +

        optString

        +
        public java.lang.String optString(int index,
        +                                  java.lang.String defaultValue)
        +
        Get the optional string associated with an index. The defaultValue is + returned if the key is not found.
        +
        +
        Parameters:
        +
        index - The index must be between 0 and length() - 1.
        +
        defaultValue - The default value.
        +
        Returns:
        +
        A String value.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(boolean value)
        +
        Append a boolean value. This increases the array's length by one.
        +
        +
        Parameters:
        +
        value - A boolean value.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(java.util.Collection<java.lang.Object> value)
        +
        Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
        +
        +
        Parameters:
        +
        value - A Collection value.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(double value)
        +              throws JSONException
        +
        Append a double value. This increases the array's length by one.
        +
        +
        Parameters:
        +
        value - A double value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - if the value is not finite.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int value)
        +
        Append an int value. This increases the array's length by one.
        +
        +
        Parameters:
        +
        value - An int value.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(long value)
        +
        Append an long value. This increases the array's length by one.
        +
        +
        Parameters:
        +
        value - A long value.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(java.util.Map<java.lang.String,java.lang.Object> value)
        +
        Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
        +
        +
        Parameters:
        +
        value - A Map value.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(java.lang.Object value)
        +
        Append an object value. This increases the array's length by one.
        +
        +
        Parameters:
        +
        value - An object value. The value should be a Boolean, Double, + Integer, JSONArray, JSONObject, Long, or String, or the + JSONObject.NULL object.
        +
        Returns:
        +
        this.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     boolean value)
        +              throws JSONException
        +
        Put or replace a boolean value in the JSONArray. If the index is greater + than the length of the JSONArray, then null elements will be added as + necessary to pad it out.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - A boolean value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     java.util.Collection<java.lang.Object> value)
        +              throws JSONException
        +
        Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - A Collection value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative or if the value is not finite.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     double value)
        +              throws JSONException
        +
        Put or replace a double value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - A double value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative or if the value is not finite.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     int value)
        +              throws JSONException
        +
        Put or replace an int value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - An int value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     long value)
        +              throws JSONException
        +
        Put or replace a long value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - A long value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     java.util.Map<java.lang.String,java.lang.Object> value)
        +              throws JSONException
        +
        Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - The Map value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative or if the the value is an invalid + number.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONArray put(int index,
        +                     java.lang.Object value)
        +              throws JSONException
        +
        Put or replace an object value in the JSONArray. If the index is greater + than the length of the JSONArray, then null elements will be added as + necessary to pad it out.
        +
        +
        Parameters:
        +
        index - The subscript.
        +
        value - The value to put into the array. The value should be a + Boolean, Double, Integer, JSONArray, JSONObject, Long, or + String, or the JSONObject.NULL object.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the index is negative or if the the value is an invalid + number.
        +
        +
      • +
      + + + +
        +
      • +

        remove

        +
        public java.lang.Object remove(int index)
        +
        Remove an index and close the hole.
        +
        +
        Parameters:
        +
        index - The index of the element to be removed.
        +
        Returns:
        +
        The value that was associated with the index, or null if there + was no value.
        +
        +
      • +
      + + + +
        +
      • +

        similar

        +
        public boolean similar(java.lang.Object other)
        +
        Determine if two JSONArrays are similar. + They must contain similar sequences.
        +
        +
        Parameters:
        +
        other - The other JSONArray
        +
        Returns:
        +
        true if they are equal
        +
        +
      • +
      + + + +
        +
      • +

        toJSONObject

        +
        public JSONObject toJSONObject(JSONArray names)
        +                        throws JSONException
        +
        Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
        +
        +
        Parameters:
        +
        names - A JSONArray containing a list of key strings. These will be + paired with the values.
        +
        Returns:
        +
        A JSONObject, or null if there are no names or if this JSONArray + has no values.
        +
        Throws:
        +
        JSONException - If any of the names are null.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Make a JSON text of this JSONArray. For compactness, no unnecessary + whitespace is added. If it is not possible to produce a syntactically + correct JSON text then null will be returned instead. This could occur if + the array contains an invalid number. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        a printable, displayable, transmittable representation of the + array.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString(int indentFactor)
        +                          throws JSONException
        +
        Make a prettyprinted JSON text of this JSONArray. Warning: This method + assumes that the data structure is acyclical.
        +
        +
        Parameters:
        +
        indentFactor - The number of spaces to add to each level of indentation.
        +
        Returns:
        +
        a printable, displayable, transmittable representation of the + object, beginning with [ (left + bracket) and ending with ] +  (right bracket).
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        public java.io.Writer write(java.io.Writer writer)
        +                     throws JSONException
        +
        Write the contents of the JSONArray as JSON text to a writer. For + compactness, no whitespace is added. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Returns:
        +
        The writer.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        java.io.Writer write(java.io.Writer writer,
        +                     int indentFactor,
        +                     int indent)
        +              throws JSONException
        +
        Write the contents of the JSONArray as JSON text to a writer. For + compactness, no whitespace is added. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Parameters:
        +
        indentFactor - The number of spaces to add to each level of indentation.
        +
        indent - The indention of the top level.
        +
        Returns:
        +
        The writer.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONException.html b/doc/org/json/JSONException.html new file mode 100644 index 000000000..23b63442e --- /dev/null +++ b/doc/org/json/JSONException.html @@ -0,0 +1,395 @@ + + + + + +JSONException + + + + + + + + + + + + +
+
org.json
+

Class JSONException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.json.JSONException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public class JSONException
    +extends java.lang.RuntimeException
    +
    The JSONException is thrown by the JSON.org classes when things are amiss.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private java.lang.Throwablecause 
      private static longserialVersionUID 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONException(java.lang.String message) +
      Constructs a JSONException with an explanatory message.
      +
      JSONException(java.lang.Throwable cause) +
      Constructs a new JSONException with the specified cause.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.ThrowablegetCause() +
      Returns the cause of this exception or null if the cause is nonexistent + or unknown.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        serialVersionUID

        +
        private static final long serialVersionUID
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        cause

        +
        private java.lang.Throwable cause
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONException

        +
        public JSONException(java.lang.String message)
        +
        Constructs a JSONException with an explanatory message.
        +
        +
        Parameters:
        +
        message - Detail about the reason for the exception.
        +
        +
      • +
      + + + +
        +
      • +

        JSONException

        +
        public JSONException(java.lang.Throwable cause)
        +
        Constructs a new JSONException with the specified cause.
        +
        +
        Parameters:
        +
        cause - The cause.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getCause

        +
        public java.lang.Throwable getCause()
        +
        Returns the cause of this exception or null if the cause is nonexistent + or unknown.
        +
        +
        Overrides:
        +
        getCause in class java.lang.Throwable
        +
        Returns:
        +
        the cause of this exception or null if the cause is nonexistent + or unknown.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONML.html b/doc/org/json/JSONML.html new file mode 100644 index 000000000..b1d341bfa --- /dev/null +++ b/doc/org/json/JSONML.html @@ -0,0 +1,480 @@ + + + + + +JSONML + + + + + + + + + + + + +
+
org.json
+

Class JSONML

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONML
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JSONML
    +extends java.lang.Object
    +
    This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONML() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      private static java.lang.Objectparse(XMLTokener x, + boolean arrayForm, + JSONArray ja) +
      Parse XML values and store them in a JSONArray.
      +
      static JSONArraytoJSONArray(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      static JSONArraytoJSONArray(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      static JSONObjecttoJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      static JSONObjecttoJSONObject(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      static java.lang.StringtoString(JSONArray ja) +
      Reverse the JSONML transformation, making an XML text from a JSONArray.
      +
      static java.lang.StringtoString(JSONObject jo) +
      Reverse the JSONML transformation, making an XML text from a JSONObject.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONML

        +
        public JSONML()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        parse

        +
        private static java.lang.Object parse(XMLTokener x,
        +                                      boolean arrayForm,
        +                                      JSONArray ja)
        +                               throws JSONException
        +
        Parse XML values and store them in a JSONArray.
        +
        +
        Parameters:
        +
        x - The XMLTokener containing the source string.
        +
        arrayForm - true if array form, false if object form.
        +
        ja - The JSONArray that is containing the current tag or null + if we are at the outermost level.
        +
        Returns:
        +
        A JSONArray if the value is the outermost tag, otherwise null.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(java.lang.String string)
        +                             throws JSONException
        +
        Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child tags. + Comments, prologs, DTDs, and <[ [ ]]> are ignored.
        +
        +
        Parameters:
        +
        string - The source string.
        +
        Returns:
        +
        A JSONArray containing the structured data from the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public static JSONArray toJSONArray(XMLTokener x)
        +                             throws JSONException
        +
        Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child content and tags. + Comments, prologs, DTDs, and <[ [ ]]> are ignored.
        +
        +
        Parameters:
        +
        x - An XMLTokener.
        +
        Returns:
        +
        A JSONArray containing the structured data from the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(XMLTokener x)
        +                               throws JSONException
        +
        Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and <[ [ ]]> are ignored.
        +
        +
        Parameters:
        +
        x - An XMLTokener of the XML source text.
        +
        Returns:
        +
        A JSONObject containing the structured data from the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.lang.String string)
        +                               throws JSONException
        +
        Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and <[ [ ]]> are ignored.
        +
        +
        Parameters:
        +
        string - The XML source text.
        +
        Returns:
        +
        A JSONObject containing the structured data from the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONArray ja)
        +                                 throws JSONException
        +
        Reverse the JSONML transformation, making an XML text from a JSONArray.
        +
        +
        Parameters:
        +
        ja - A JSONArray.
        +
        Returns:
        +
        An XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(JSONObject jo)
        +                                 throws JSONException
        +
        Reverse the JSONML transformation, making an XML text from a JSONObject. + The JSONObject must contain a "tagName" property. If it has children, + then it must have a "childNodes" property containing an array of objects. + The other properties are attributes with string values.
        +
        +
        Parameters:
        +
        jo - A JSONObject.
        +
        Returns:
        +
        An XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONObject.Null.html b/doc/org/json/JSONObject.Null.html new file mode 100644 index 000000000..6d5982c8c --- /dev/null +++ b/doc/org/json/JSONObject.Null.html @@ -0,0 +1,336 @@ + + + + + +JSONObject.Null + + + + + + + + + + + + +
+
org.json
+

Class JSONObject.Null

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONObject.Null
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    JSONObject
    +
    +
    +
    +
    private static final class JSONObject.Null
    +extends java.lang.Object
    +
    JSONObject.NULL is equivalent to the value that JavaScript calls null, + whilst Java's null is equivalent to the value that JavaScript calls + undefined.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ModifierConstructor and Description
      private Null() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected java.lang.Objectclone() +
      There is only intended to be a single instance of the NULL object, + so the clone method returns itself.
      +
      booleanequals(java.lang.Object object) +
      A Null object is equal to the null value and to itself.
      +
      java.lang.StringtoString() +
      Get the "null" string value.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Null

        +
        private Null()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        clone

        +
        protected final java.lang.Object clone()
        +
        There is only intended to be a single instance of the NULL object, + so the clone method returns itself.
        +
        +
        Overrides:
        +
        clone in class java.lang.Object
        +
        Returns:
        +
        NULL.
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object object)
        +
        A Null object is equal to the null value and to itself.
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        Parameters:
        +
        object - An object to test for nullness.
        +
        Returns:
        +
        true if the object parameter is the JSONObject.NULL object or + null.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Get the "null" string value.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        The string "null".
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONObject.html b/doc/org/json/JSONObject.html new file mode 100644 index 000000000..5d66a944a --- /dev/null +++ b/doc/org/json/JSONObject.html @@ -0,0 +1,2470 @@ + + + + + +JSONObject + + + + + + + + + + + + +
+
org.json
+

Class JSONObject

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONObject
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JSONObject
    +extends java.lang.Object
    +
    A JSONObject is an unordered collection of name/value pairs. Its external + form is a string wrapped in curly braces with colons between the names and + values, and commas between the values and names. The internal form is an + object having get and opt methods for accessing + the values by name, and put methods for adding or replacing + values by name. The values can be any of these types: Boolean, + JSONArray, JSONObject, Number, + String, or the JSONObject.NULL object. A + JSONObject constructor can be used to convert an external form JSON text + into an internal form whose values can be retrieved with the + get and opt methods, or to convert values into a + JSON text using the put and toString methods. A + get method returns a value if one can be found, and throws an + exception if one cannot be found. An opt method returns a + default value instead of throwing an exception, and so is useful for + obtaining optional values. +

    + The generic get() and opt() methods return an + object, which you can cast or query for type. There are also typed + get and opt methods that do type checking and type + coercion for you. The opt methods differ from the get methods in that they + do not throw. Instead, they return a specified value, such as null. +

    + The put methods add or replace values in an object. For + example, + +

    + myString = new JSONObject()
    +         .put("JSON", "Hello, World!").toString();
    + 
    + + produces the string {"JSON": "Hello, World"}. +

    + The texts produced by the toString methods strictly conform to + the JSON syntax rules. The constructors are more forgiving in the texts they + will accept: +

      +
    • An extra , (comma) may appear just + before the closing brace.
    • +
    • Strings may be quoted with ' (single + quote).
    • +
    • Strings do not need to be quoted at all if they do not begin with a + quote or single quote, and if they do not contain leading or trailing + spaces, and if they do not contain any of these characters: + { } [ ] / \ : , # and if they do not look like numbers and + if they are not the reserved words true, false, + or null.
    • +
    +
    +
    Version:
    +
    2015-07-22
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      private static class JSONObject.Null +
      JSONObject.NULL is equivalent to the value that JavaScript calls null, + whilst Java's null is equivalent to the value that JavaScript calls + undefined.
      +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private java.util.Map<java.lang.String,java.lang.Object>map +
      The map where the JSONObject's properties are kept.
      +
      static java.lang.ObjectNULL +
      It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONObject() +
      Construct an empty JSONObject.
      +
      JSONObject(JSONObject jo, + java.lang.String[] names) +
      Construct a JSONObject from a subset of another JSONObject.
      +
      JSONObject(JSONTokener x) +
      Construct a JSONObject from a JSONTokener.
      +
      JSONObject(java.util.Map<java.lang.String,java.lang.Object> map) +
      Construct a JSONObject from a Map.
      +
      JSONObject(java.lang.Object bean) +
      Construct a JSONObject from an Object using bean getters.
      +
      JSONObject(java.lang.Object object, + java.lang.String[] names) +
      Construct a JSONObject from an Object, using reflection to find the + public members.
      +
      JSONObject(java.lang.String source) +
      Construct a JSONObject from a source JSON text string.
      +
      JSONObject(java.lang.String baseName, + java.util.Locale locale) +
      Construct a JSONObject from a ResourceBundle.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      JSONObjectaccumulate(java.lang.String key, + java.lang.Object value) +
      Accumulate values under a key.
      +
      JSONObjectappend(java.lang.String key, + java.lang.Object value) +
      Append values to the array under a key.
      +
      static java.lang.StringdoubleToString(double d) +
      Produce a string from a double.
      +
      java.lang.Objectget(java.lang.String key) +
      Get the value object associated with a key.
      +
      java.math.BigDecimalgetBigDecimal(java.lang.String key) +
      Get the BigDecimal value associated with a key.
      +
      java.math.BigDecimalgetBigDecimalSafe(java.lang.String key, + java.math.BigDecimal defaultValue) +
      Get the BigDecimal value associated with a key.
      +
      java.math.BigIntegergetBigInteger(java.lang.String key) +
      Get the BigInteger value associated with a key.
      +
      java.math.BigIntegergetBigIntegerSafe(java.lang.String key, + java.math.BigInteger defaultValue) +
      Get the BigInteger value associated with a key.
      +
      longgetBigIntegerSafe(java.lang.String key, + long defaultValue) +
      Get the long value associated with a key.
      +
      booleangetBoolean(java.lang.String key) +
      Get the boolean value associated with a key.
      +
      booleangetBooleanSafe(java.lang.String key, + boolean defaultValue) +
      Get the boolean associated with a key.
      +
      doublegetDouble(java.lang.String key) +
      Get the double value associated with a key.
      +
      doublegetDoubleSafe(java.lang.String key, + double defaultValue) +
      Get the double value associated with a key.
      +
      <E extends java.lang.Enum<E>>
      E
      getEnum(java.lang.Class<E> clazz, + java.lang.String key) +
      Get the enum value associated with a key.
      +
      intgetInt(java.lang.String key) +
      Get the int value associated with a key.
      +
      intgetIntSafe(java.lang.String key, + int defaultValue) +
      Get the int value associated with a key.
      +
      JSONArraygetJSONArray(java.lang.String key) +
      Get the JSONArray value associated with a key.
      +
      JSONObjectgetJSONObject(java.lang.String key) +
      Get the JSONObject value associated with a key.
      +
      longgetLong(java.lang.String key) +
      Get the long value associated with a key.
      +
      static java.lang.String[]getNames(JSONObject jo) +
      Get an array of field names from a JSONObject.
      +
      static java.lang.String[]getNames(java.lang.Object object) +
      Get an array of field names from an Object.
      +
      java.lang.StringgetString(java.lang.String key) +
      Get the string associated with a key.
      +
      java.lang.StringgetStringSafe(java.lang.String key, + java.lang.String defaultValue) +
      Get the string associated with a key.
      +
      booleanhas(java.lang.String key) +
      Determine if the JSONObject contains a specific key.
      +
      JSONObjectincrement(java.lang.String key) +
      Increment a property of a JSONObject.
      +
      (package private) static voidindent(java.io.Writer writer, + int indent) 
      booleanisNull(java.lang.String key) +
      Determine if the value associated with the key is null or if there is no + value.
      +
      java.util.Iterator<java.lang.String>keys() +
      Get an enumeration of the keys of the JSONObject.
      +
      java.util.Set<java.lang.String>keySet() +
      Get a set of keys of the JSONObject.
      +
      intlength() +
      Get the number of keys stored in the JSONObject.
      +
      JSONArraynames() +
      Produce a JSONArray containing the names of the elements of this + JSONObject.
      +
      static java.lang.StringnumberToString(java.lang.Number number) +
      Produce a string from a Number.
      +
      java.lang.Objectopt(java.lang.String key) +
      Get an optional value associated with a key.
      +
      java.math.BigDecimaloptBigDecimal(java.lang.String key, + java.math.BigDecimal defaultValue) +
      Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
      +
      java.math.BigIntegeroptBigInteger(java.lang.String key, + java.math.BigInteger defaultValue) +
      Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
      +
      booleanoptBoolean(java.lang.String key) +
      Get an optional boolean associated with a key.
      +
      booleanoptBoolean(java.lang.String key, + boolean defaultValue) +
      Get an optional boolean associated with a key.
      +
      doubleoptDouble(java.lang.String key) +
      Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number.
      +
      doubleoptDouble(java.lang.String key, + double defaultValue) +
      Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
      +
      <E extends java.lang.Enum<E>>
      E
      optEnum(java.lang.Class<E> clazz, + java.lang.String key) +
      Get the enum value associated with a key.
      +
      <E extends java.lang.Enum<E>>
      E
      optEnum(java.lang.Class<E> clazz, + java.lang.String key, + E defaultValue) +
      Get the enum value associated with a key.
      +
      intoptInt(java.lang.String key) +
      Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number.
      +
      intoptInt(java.lang.String key, + int defaultValue) +
      Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number.
      +
      JSONArrayoptJSONArray(java.lang.String key) +
      Get an optional JSONArray associated with a key.
      +
      JSONObjectoptJSONObject(java.lang.String key) +
      Get an optional JSONObject associated with a key.
      +
      longoptLong(java.lang.String key) +
      Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number.
      +
      longoptLong(java.lang.String key, + long defaultValue) +
      Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number.
      +
      java.lang.StringoptString(java.lang.String key) +
      Get an optional string associated with a key.
      +
      java.lang.StringoptString(java.lang.String key, + java.lang.String defaultValue) +
      Get an optional string associated with a key.
      +
      private voidpopulateMap(java.lang.Object bean) 
      JSONObjectput(java.lang.String key, + boolean value) +
      Put a key/boolean pair in the JSONObject.
      +
      JSONObjectput(java.lang.String key, + java.util.Collection<java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
      +
      JSONObjectput(java.lang.String key, + double value) +
      Put a key/double pair in the JSONObject.
      +
      JSONObjectput(java.lang.String key, + int value) +
      Put a key/int pair in the JSONObject.
      +
      JSONObjectput(java.lang.String key, + long value) +
      Put a key/long pair in the JSONObject.
      +
      JSONObjectput(java.lang.String key, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
      +
      JSONObjectput(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject.
      +
      JSONObjectputOnce(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
      +
      JSONObjectputOpt(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
      +
      static java.lang.Stringquote(java.lang.String string) +
      Produce a string in double quotes with backslash sequences in all the + right places.
      +
      static java.io.Writerquote(java.lang.String string, + java.io.Writer w) 
      java.lang.Objectremove(java.lang.String key) +
      Remove a name and its value, if present.
      +
      booleansimilar(java.lang.Object other) +
      Determine if two JSONObjects are similar.
      +
      static java.lang.ObjectstringToValue(java.lang.String string) +
      Try to convert a string into a number, boolean, or null.
      +
      static voidtestValidity(java.lang.Object o) +
      Throw an exception if the object is a NaN or infinite number.
      +
      JSONArraytoJSONArray(JSONArray names) +
      Produce a JSONArray containing the values of the members of this + JSONObject.
      +
      java.lang.StringtoString() +
      Make a JSON text of this JSONObject.
      +
      java.lang.StringtoString(int indentFactor) +
      Make a prettyprinted JSON text of this JSONObject.
      +
      static java.lang.StringvalueToString(java.lang.Object value) +
      Make a JSON text of an Object value.
      +
      static java.lang.Objectwrap(java.lang.Object object) +
      Wrap an object, if necessary.
      +
      java.io.Writerwrite(java.io.Writer writer) +
      Write the contents of the JSONObject as JSON text to a writer.
      +
      (package private) java.io.Writerwrite(java.io.Writer writer, + int indentFactor, + int indent) +
      Write the contents of the JSONObject as JSON text to a writer.
      +
      (package private) static java.io.WriterwriteValue(java.io.Writer writer, + java.lang.Object value, + int indentFactor, + int indent) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        map

        +
        private final java.util.Map<java.lang.String,java.lang.Object> map
        +
        The map where the JSONObject's properties are kept.
        +
      • +
      + + + +
        +
      • +

        NULL

        +
        public static final java.lang.Object NULL
        +
        It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value. + JSONObject.NULL.equals(null) returns true. + JSONObject.NULL.toString() returns "null".
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject()
        +
        Construct an empty JSONObject.
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(JSONObject jo,
        +                  java.lang.String[] names)
        +
        Construct a JSONObject from a subset of another JSONObject. An array of + strings is used to identify the keys that should be copied. Missing keys + are ignored.
        +
        +
        Parameters:
        +
        jo - A JSONObject.
        +
        names - An array of strings.
        +
        Throws:
        +
        JSONException
        +
        JSONException - If a value is a non-finite number or if a name is + duplicated.
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(JSONTokener x)
        +           throws JSONException
        +
        Construct a JSONObject from a JSONTokener.
        +
        +
        Parameters:
        +
        x - A JSONTokener object containing the source string.
        +
        Throws:
        +
        JSONException - If there is a syntax error in the source string or a + duplicated key.
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(java.util.Map<java.lang.String,java.lang.Object> map)
        +
        Construct a JSONObject from a Map.
        +
        +
        Parameters:
        +
        map - A map object that can be used to initialize the contents of + the JSONObject.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(java.lang.Object bean)
        +
        Construct a JSONObject from an Object using bean getters. It reflects on + all of the public methods of the object. For each of the methods with no + parameters and a name starting with "get" or + "is" followed by an uppercase letter, the method is invoked, + and a key and the value returned from the getter method are put into the + new JSONObject. + + The key is formed by removing the "get" or "is" + prefix. If the second remaining character is not upper case, then the + first character is converted to lower case. + + For example, if an object has a method named "getName", and + if the result of calling object.getName() is + "Larry Fine", then the JSONObject will contain + "name": "Larry Fine".
        +
        +
        Parameters:
        +
        bean - An object that has getter methods that should be used to make + a JSONObject.
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(java.lang.Object object,
        +                  java.lang.String[] names)
        +
        Construct a JSONObject from an Object, using reflection to find the + public members. The resulting JSONObject's keys will be the strings from + the names array, and the values will be the field values associated with + those keys in the object. If a key is not found or not visible, then it + will not be copied into the new JSONObject.
        +
        +
        Parameters:
        +
        object - An object that has fields that should be used to make a + JSONObject.
        +
        names - An array of strings, the names of the fields to be obtained + from the object.
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(java.lang.String source)
        +           throws JSONException
        +
        Construct a JSONObject from a source JSON text string. This is the most + commonly used JSONObject constructor.
        +
        +
        Parameters:
        +
        source - A string beginning with { (left + brace) and ending with } +  (right brace).
        +
        Throws:
        +
        JSONException - If there is a syntax error in the source string or a + duplicated key.
        +
        +
      • +
      + + + +
        +
      • +

        JSONObject

        +
        public JSONObject(java.lang.String baseName,
        +                  java.util.Locale locale)
        +           throws JSONException
        +
        Construct a JSONObject from a ResourceBundle.
        +
        +
        Parameters:
        +
        baseName - The ResourceBundle base name.
        +
        locale - The Locale to load the ResourceBundle for.
        +
        Throws:
        +
        JSONException - If any JSONExceptions are detected.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        accumulate

        +
        public JSONObject accumulate(java.lang.String key,
        +                             java.lang.Object value)
        +                      throws JSONException
        +
        Accumulate values under a key. It is similar to the put method except + that if there is already an object stored under the key then a JSONArray + is stored under the key to hold all of the accumulated values. If there + is already a JSONArray, then the new value is appended to it. In + contrast, the put method replaces the previous value. + + If only one value is accumulated that is not a JSONArray, then the result + will be the same as using put. But if multiple values are accumulated, + then the result will be like append.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - An object to be accumulated under the key.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the value is an invalid number or if the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        append

        +
        public JSONObject append(java.lang.String key,
        +                         java.lang.Object value)
        +                  throws JSONException
        +
        Append values to the array under a key. If the key does not exist in the + JSONObject, then the key is put in the JSONObject with its value being a + JSONArray containing the value parameter. If the key was already + associated with a JSONArray, then the value parameter is appended to it.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - An object to be accumulated under the key.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the key is null or if the current value associated with + the key is not a JSONArray.
        +
        +
      • +
      + + + +
        +
      • +

        doubleToString

        +
        public static java.lang.String doubleToString(double d)
        +
        Produce a string from a double. The string "null" will be returned if the + number is not finite.
        +
        +
        Parameters:
        +
        d - A double.
        +
        Returns:
        +
        A String.
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public java.lang.Object get(java.lang.String key)
        +                     throws JSONException
        +
        Get the value object associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The object associated with the key.
        +
        Throws:
        +
        JSONException - if the key is not found.
        +
        +
      • +
      + + + +
        +
      • +

        getEnum

        +
        public <E extends java.lang.Enum<E>> E getEnum(java.lang.Class<E> clazz,
        +                                               java.lang.String key)
        +                                        throws JSONException
        +
        Get the enum value associated with a key.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        key - A key string.
        +
        Returns:
        +
        The enum value associated with the key
        +
        Throws:
        +
        JSONException - if the key is not found or if the value cannot be converted + to an enum.
        +
        +
      • +
      + + + +
        +
      • +

        getBoolean

        +
        public boolean getBoolean(java.lang.String key)
        +                   throws JSONException
        +
        Get the boolean value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The truth.
        +
        Throws:
        +
        JSONException - if the value is not a Boolean or the String "true" or + "false".
        +
        +
      • +
      + + + +
        +
      • +

        getBooleanSafe

        +
        public boolean getBooleanSafe(java.lang.String key,
        +                              boolean defaultValue)
        +
        Get the boolean associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The truth.
        +
        +
      • +
      + + + +
        +
      • +

        getBigInteger

        +
        public java.math.BigInteger getBigInteger(java.lang.String key)
        +                                   throws JSONException
        +
        Get the BigInteger value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The numeric value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value cannot + be converted to BigInteger.
        +
        +
      • +
      + + + +
        +
      • +

        getBigIntegerSafe

        +
        public java.math.BigInteger getBigIntegerSafe(java.lang.String key,
        +                                              java.math.BigInteger defaultValue)
        +
        Get the BigInteger value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The numeric value.
        +
        +
      • +
      + + + +
        +
      • +

        getBigDecimal

        +
        public java.math.BigDecimal getBigDecimal(java.lang.String key)
        +                                   throws JSONException
        +
        Get the BigDecimal value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The numeric value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value + cannot be converted to BigDecimal.
        +
        +
      • +
      + + + +
        +
      • +

        getBigDecimalSafe

        +
        public java.math.BigDecimal getBigDecimalSafe(java.lang.String key,
        +                                              java.math.BigDecimal defaultValue)
        +
        Get the BigDecimal value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The numeric value.
        +
        +
      • +
      + + + +
        +
      • +

        getDouble

        +
        public double getDouble(java.lang.String key)
        +                 throws JSONException
        +
        Get the double value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The numeric value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
        +
        +
      • +
      + + + +
        +
      • +

        getDoubleSafe

        +
        public double getDoubleSafe(java.lang.String key,
        +                            double defaultValue)
        +
        Get the double value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The numeric value.
        +
        +
      • +
      + + + +
        +
      • +

        getInt

        +
        public int getInt(java.lang.String key)
        +           throws JSONException
        +
        Get the int value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The integer value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value cannot be converted + to an integer.
        +
        +
      • +
      + + + +
        +
      • +

        getIntSafe

        +
        public int getIntSafe(java.lang.String key,
        +                      int defaultValue)
        +
        Get the int value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The numeric value.
        +
        +
      • +
      + + + +
        +
      • +

        getJSONArray

        +
        public JSONArray getJSONArray(java.lang.String key)
        +                       throws JSONException
        +
        Get the JSONArray value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A JSONArray which is the value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value is not a JSONArray.
        +
        +
      • +
      + + + +
        +
      • +

        getJSONObject

        +
        public JSONObject getJSONObject(java.lang.String key)
        +                         throws JSONException
        +
        Get the JSONObject value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A JSONObject which is the value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value is not a JSONObject.
        +
        +
      • +
      + + + +
        +
      • +

        getLong

        +
        public long getLong(java.lang.String key)
        +             throws JSONException
        +
        Get the long value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The long value.
        +
        Throws:
        +
        JSONException - if the key is not found or if the value cannot be converted + to a long.
        +
        +
      • +
      + + + +
        +
      • +

        getBigIntegerSafe

        +
        public long getBigIntegerSafe(java.lang.String key,
        +                              long defaultValue)
        +
        Get the long value associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        The numeric value.
        +
        +
      • +
      + + + +
        +
      • +

        getNames

        +
        public static java.lang.String[] getNames(JSONObject jo)
        +
        Get an array of field names from a JSONObject.
        +
        +
        Returns:
        +
        An array of field names, or null if there are no names.
        +
        +
      • +
      + + + +
        +
      • +

        getNames

        +
        public static java.lang.String[] getNames(java.lang.Object object)
        +
        Get an array of field names from an Object.
        +
        +
        Returns:
        +
        An array of field names, or null if there are no names.
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString(java.lang.String key)
        +                           throws JSONException
        +
        Get the string associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A string which is the value.
        +
        Throws:
        +
        JSONException - if there is no string value for the key.
        +
        +
      • +
      + + + +
        +
      • +

        getStringSafe

        +
        public java.lang.String getStringSafe(java.lang.String key,
        +                                      java.lang.String defaultValue)
        +
        Get the string associated with a key. If the key doesn't exist, or any errors occur, return defaultValue instead.
        +
        +
        Parameters:
        +
        key - A key String.
        +
        defaultValue - The value to return if the key doesn't exist or errors occur.
        +
        Returns:
        +
        A string which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        has

        +
        public boolean has(java.lang.String key)
        +
        Determine if the JSONObject contains a specific key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        true if the key exists in the JSONObject.
        +
        +
      • +
      + + + +
        +
      • +

        increment

        +
        public JSONObject increment(java.lang.String key)
        +                     throws JSONException
        +
        Increment a property of a JSONObject. If there is no such property, + create one with a value of 1. If there is such a property, and if it is + an Integer, Long, Double, or Float, then add one to it.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If there is already a property with this name that is not an + Integer, Long, Double, or Float.
        +
        +
      • +
      + + + +
        +
      • +

        isNull

        +
        public boolean isNull(java.lang.String key)
        +
        Determine if the value associated with the key is null or if there is no + value.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        true if there is no value associated with the key or if the value + is the JSONObject.NULL object.
        +
        +
      • +
      + + + +
        +
      • +

        keys

        +
        public java.util.Iterator<java.lang.String> keys()
        +
        Get an enumeration of the keys of the JSONObject.
        +
        +
        Returns:
        +
        An iterator of the keys.
        +
        +
      • +
      + + + +
        +
      • +

        keySet

        +
        public java.util.Set<java.lang.String> keySet()
        +
        Get a set of keys of the JSONObject.
        +
        +
        Returns:
        +
        A keySet.
        +
        +
      • +
      + + + +
        +
      • +

        length

        +
        public int length()
        +
        Get the number of keys stored in the JSONObject.
        +
        +
        Returns:
        +
        The number of keys in the JSONObject.
        +
        +
      • +
      + + + +
        +
      • +

        names

        +
        public JSONArray names()
        +
        Produce a JSONArray containing the names of the elements of this + JSONObject.
        +
        +
        Returns:
        +
        A JSONArray containing the key strings, or null if the JSONObject + is empty.
        +
        +
      • +
      + + + +
        +
      • +

        numberToString

        +
        public static java.lang.String numberToString(java.lang.Number number)
        +                                       throws JSONException
        +
        Produce a string from a Number.
        +
        +
        Parameters:
        +
        number - A Number
        +
        Returns:
        +
        A String.
        +
        Throws:
        +
        JSONException - If n is a non-finite number.
        +
        +
      • +
      + + + +
        +
      • +

        opt

        +
        public java.lang.Object opt(java.lang.String key)
        +
        Get an optional value associated with a key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        An object which is the value, or null if there is no value.
        +
        +
      • +
      + + + +
        +
      • +

        optEnum

        +
        public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz,
        +                                               java.lang.String key)
        +
        Get the enum value associated with a key.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        key - A key string.
        +
        Returns:
        +
        The enum value associated with the key or null if not found
        +
        +
      • +
      + + + + + +
        +
      • +

        optEnum

        +
        public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz,
        +                                               java.lang.String key,
        +                                               E defaultValue)
        +
        Get the enum value associated with a key.
        +
        +
        Parameters:
        +
        clazz - The type of enum to retrieve.
        +
        key - A key string.
        +
        defaultValue - The default in case the value is not found
        +
        Returns:
        +
        The enum value associated with the key or defaultValue + if the value is not found or cannot be assigned to clazz
        +
        +
      • +
      + + + +
        +
      • +

        optBoolean

        +
        public boolean optBoolean(java.lang.String key)
        +
        Get an optional boolean associated with a key. It returns false if there + is no such key, or if the value is not Boolean.TRUE or the String "true".
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        The truth.
        +
        +
      • +
      + + + +
        +
      • +

        optBoolean

        +
        public boolean optBoolean(java.lang.String key,
        +                          boolean defaultValue)
        +
        Get an optional boolean associated with a key. It returns the + defaultValue if there is no such key, or if it is not a Boolean or the + String "true" or "false" (case insensitive).
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        The truth.
        +
        +
      • +
      + + + +
        +
      • +

        optDouble

        +
        public double optDouble(java.lang.String key)
        +
        Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number. If the value is a string, an attempt + will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A string which is the key.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optBigInteger

        +
        public java.math.BigInteger optBigInteger(java.lang.String key,
        +                                          java.math.BigInteger defaultValue)
        +
        Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optBigDecimal

        +
        public java.math.BigDecimal optBigDecimal(java.lang.String key,
        +                                          java.math.BigDecimal defaultValue)
        +
        Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optDouble

        +
        public double optDouble(java.lang.String key,
        +                        double defaultValue)
        +
        Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optInt

        +
        public int optInt(java.lang.String key)
        +
        Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optInt

        +
        public int optInt(java.lang.String key,
        +                  int defaultValue)
        +
        Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optJSONArray

        +
        public JSONArray optJSONArray(java.lang.String key)
        +
        Get an optional JSONArray associated with a key. It returns null if there + is no such key, or if its value is not a JSONArray.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A JSONArray which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optJSONObject

        +
        public JSONObject optJSONObject(java.lang.String key)
        +
        Get an optional JSONObject associated with a key. It returns null if + there is no such key, or if its value is not a JSONObject.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A JSONObject which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optLong

        +
        public long optLong(java.lang.String key)
        +
        Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optLong

        +
        public long optLong(java.lang.String key,
        +                    long defaultValue)
        +
        Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        An object which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optString

        +
        public java.lang.String optString(java.lang.String key)
        +
        Get an optional string associated with a key. It returns an empty string + if there is no such key. If the value is not a string and is not null, + then it is converted to a string.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        Returns:
        +
        A string which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        optString

        +
        public java.lang.String optString(java.lang.String key,
        +                                  java.lang.String defaultValue)
        +
        Get an optional string associated with a key. It returns the defaultValue + if there is no such key.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        defaultValue - The default.
        +
        Returns:
        +
        A string which is the value.
        +
        +
      • +
      + + + +
        +
      • +

        populateMap

        +
        private void populateMap(java.lang.Object bean)
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      boolean value)
        +               throws JSONException
        +
        Put a key/boolean pair in the JSONObject.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - A boolean which is the value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      java.util.Collection<java.lang.Object> value)
        +               throws JSONException
        +
        Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - A Collection value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      double value)
        +               throws JSONException
        +
        Put a key/double pair in the JSONObject.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - A double which is the value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the key is null or if the number is invalid.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      int value)
        +               throws JSONException
        +
        Put a key/int pair in the JSONObject.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - An int which is the value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      long value)
        +               throws JSONException
        +
        Put a key/long pair in the JSONObject.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - A long which is the value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      java.util.Map<java.lang.String,java.lang.Object> value)
        +               throws JSONException
        +
        Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - A Map value.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        put

        +
        public JSONObject put(java.lang.String key,
        +                      java.lang.Object value)
        +               throws JSONException
        +
        Put a key/value pair in the JSONObject. If the value is null, then the + key will be removed from the JSONObject if it is present.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - An object which is the value. It should be of one of these + types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + String, or the JSONObject.NULL object.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the value is non-finite number or if the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        putOnce

        +
        public JSONObject putOnce(java.lang.String key,
        +                          java.lang.Object value)
        +                   throws JSONException
        +
        Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
        +
        +
        Parameters:
        +
        key - string
        +
        value - object
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - if the key is a duplicate
        +
        +
      • +
      + + + +
        +
      • +

        putOpt

        +
        public JSONObject putOpt(java.lang.String key,
        +                         java.lang.Object value)
        +                  throws JSONException
        +
        Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
        +
        +
        Parameters:
        +
        key - A key string.
        +
        value - An object which is the value. It should be of one of these + types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + String, or the JSONObject.NULL object.
        +
        Returns:
        +
        this.
        +
        Throws:
        +
        JSONException - If the value is a non-finite number.
        +
        +
      • +
      + + + +
        +
      • +

        quote

        +
        public static java.lang.String quote(java.lang.String string)
        +
        Produce a string in double quotes with backslash sequences in all the + right places. A backslash will be inserted within +
        +
        Parameters:
        +
        string - A String
        +
        Returns:
        +
        A String correctly formatted for insertion in a JSON text.
        +
        +
      • +
      + + + +
        +
      • +

        quote

        +
        public static java.io.Writer quote(java.lang.String string,
        +                                   java.io.Writer w)
        +                            throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        remove

        +
        public java.lang.Object remove(java.lang.String key)
        +
        Remove a name and its value, if present.
        +
        +
        Parameters:
        +
        key - The name to be removed.
        +
        Returns:
        +
        The value that was associated with the name, or null if there was + no value.
        +
        +
      • +
      + + + +
        +
      • +

        similar

        +
        public boolean similar(java.lang.Object other)
        +
        Determine if two JSONObjects are similar. + They must contain the same set of names which must be associated with + similar values.
        +
        +
        Parameters:
        +
        other - The other JSONObject
        +
        Returns:
        +
        true if they are equal
        +
        +
      • +
      + + + +
        +
      • +

        stringToValue

        +
        public static java.lang.Object stringToValue(java.lang.String string)
        +
        Try to convert a string into a number, boolean, or null. If the string + can't be converted, return the string.
        +
        +
        Parameters:
        +
        string - A String.
        +
        Returns:
        +
        A simple JSON value.
        +
        +
      • +
      + + + +
        +
      • +

        testValidity

        +
        public static void testValidity(java.lang.Object o)
        +                         throws JSONException
        +
        Throw an exception if the object is a NaN or infinite number.
        +
        +
        Parameters:
        +
        o - The object to test.
        +
        Throws:
        +
        JSONException - If o is a non-finite number.
        +
        +
      • +
      + + + +
        +
      • +

        toJSONArray

        +
        public JSONArray toJSONArray(JSONArray names)
        +                      throws JSONException
        +
        Produce a JSONArray containing the values of the members of this + JSONObject.
        +
        +
        Parameters:
        +
        names - A JSONArray containing a list of key strings. This determines + the sequence of the values in the result.
        +
        Returns:
        +
        A JSONArray of values.
        +
        Throws:
        +
        JSONException - If any of the values are non-finite numbers.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Make a JSON text of this JSONObject. For compactness, no whitespace is + added. If this would not result in a syntactically correct JSON text, + then null will be returned instead. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        a printable, displayable, portable, transmittable representation + of the object, beginning with { (left + brace) and ending with } (right + brace).
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString(int indentFactor)
        +                          throws JSONException
        +
        Make a prettyprinted JSON text of this JSONObject. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Parameters:
        +
        indentFactor - The number of spaces to add to each level of indentation.
        +
        Returns:
        +
        a printable, displayable, portable, transmittable representation + of the object, beginning with { (left + brace) and ending with } (right + brace).
        +
        Throws:
        +
        JSONException - If the object contains an invalid number.
        +
        +
      • +
      + + + +
        +
      • +

        valueToString

        +
        public static java.lang.String valueToString(java.lang.Object value)
        +                                      throws JSONException
        +
        Make a JSON text of an Object value. If the object has an + value.toJSONString() method, then that method will be used to produce the + JSON text. The method is required to produce a strictly conforming text. + If the object does not contain a toJSONString method (which is the most + common case), then a text will be produced by other means. If the value + is an array or Collection, then a JSONArray will be made from it and its + toJSONString method will be called. If the value is a MAP, then a + JSONObject will be made from it and its toJSONString method will be + called. Otherwise, the value's toString method will be called, and the + result will be quoted. + +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Parameters:
        +
        value - The value to be serialized.
        +
        Returns:
        +
        a printable, displayable, transmittable representation of the + object, beginning with { (left + brace) and ending with } (right + brace).
        +
        Throws:
        +
        JSONException - If the value is or contains an invalid number.
        +
        +
      • +
      + + + +
        +
      • +

        wrap

        +
        public static java.lang.Object wrap(java.lang.Object object)
        +
        Wrap an object, if necessary. If the object is null, return the NULL + object. If it is an array or collection, wrap it in a JSONArray. If it is + a map, wrap it in a JSONObject. If it is a standard property (Double, + String, et al) then it is already wrapped. Otherwise, if it comes from + one of the java packages, turn it into a string. And if it doesn't, try + to wrap it in a JSONObject. If the wrapping fails, then null is returned.
        +
        +
        Parameters:
        +
        object - The object to wrap
        +
        Returns:
        +
        The wrapped value
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        public java.io.Writer write(java.io.Writer writer)
        +                     throws JSONException
        +
        Write the contents of the JSONObject as JSON text to a writer. For + compactness, no whitespace is added. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Returns:
        +
        The writer.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        writeValue

        +
        static final java.io.Writer writeValue(java.io.Writer writer,
        +                                       java.lang.Object value,
        +                                       int indentFactor,
        +                                       int indent)
        +                                throws JSONException,
        +                                       java.io.IOException
        +
        +
        Throws:
        +
        JSONException
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        indent

        +
        static final void indent(java.io.Writer writer,
        +                         int indent)
        +                  throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        java.io.Writer write(java.io.Writer writer,
        +                     int indentFactor,
        +                     int indent)
        +              throws JSONException
        +
        Write the contents of the JSONObject as JSON text to a writer. For + compactness, no whitespace is added. +

        + Warning: This method assumes that the data structure is acyclical.

        +
        +
        Returns:
        +
        The writer.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONString.html b/doc/org/json/JSONString.html new file mode 100644 index 000000000..39a48d3e8 --- /dev/null +++ b/doc/org/json/JSONString.html @@ -0,0 +1,234 @@ + + + + + +JSONString + + + + + + + + + + + + +
+
org.json
+

Interface JSONString

+
+
+
+
    +
  • +
    +
    +
    public interface JSONString
    +
    The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object). The + toJSONString method will be used instead of the default behavior + of using the Object's toString() method and quoting the result.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      java.lang.StringtoJSONString() +
      The toJSONString method allows a class to produce its own JSON + serialization.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toJSONString

        +
        java.lang.String toJSONString()
        +
        The toJSONString method allows a class to produce its own JSON + serialization.
        +
        +
        Returns:
        +
        A strictly syntactically correct JSON text.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONStringer.html b/doc/org/json/JSONStringer.html new file mode 100644 index 000000000..54c3d221e --- /dev/null +++ b/doc/org/json/JSONStringer.html @@ -0,0 +1,344 @@ + + + + + +JSONStringer + + + + + + + + + + + + +
+
org.json
+

Class JSONStringer

+
+
+ +
+
    +
  • +
    +
    +
    public class JSONStringer
    +extends JSONWriter
    +
    JSONStringer provides a quick and convenient way of producing JSON text. + The texts produced strictly conform to JSON syntax rules. No whitespace is + added, so the results are ready for transmission or storage. Each instance of + JSONStringer can produce one JSON text. +

    + A JSONStringer instance provides a value method for appending + values to the + text, and a key + method for adding keys before values in objects. There are array + and endArray methods that make and bound array values, and + object and endObject methods which make and bound + object values. All of these methods return the JSONWriter instance, + permitting cascade style. For example,

    + myString = new JSONStringer()
    +     .object()
    +         .key("JSON")
    +         .value("Hello, World!")
    +     .endObject()
    +     .toString();
    which produces the string
    + {"JSON":"Hello, World!"}
    +

    + The first method called must be array or object. + There are no methods for adding commas or colons. JSONStringer adds them for + you. Objects and arrays can be nested up to 20 levels deep. +

    + This can sometimes be easier than using a JSONObject to build a string.

    +
    +
    Version:
    +
    2008-09-18
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONStringer

        +
        public JSONStringer()
        +
        Make a fresh JSONStringer. It can be used to build one JSON text.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Return the JSON text. This method is used to obtain the product of the + JSONStringer instance. It will return null if there was a + problem in the construction of the JSON text (such as the calls to + array were not properly balanced with calls to + endArray).
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        The JSON text.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONTokener.html b/doc/org/json/JSONTokener.html new file mode 100644 index 000000000..338caa92a --- /dev/null +++ b/doc/org/json/JSONTokener.html @@ -0,0 +1,793 @@ + + + + + +JSONTokener + + + + + + + + + + + + +
+
org.json
+

Class JSONTokener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONTokener
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    HTTPTokener, XMLTokener
    +
    +
    +
    +
    public class JSONTokener
    +extends java.lang.Object
    +
    A JSONTokener takes a source string and extracts characters and tokens from + it. It is used by the JSONObject and JSONArray constructors to parse + JSON source strings.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private longcharacter 
      private booleaneof 
      private longindex 
      private longline 
      private charprevious 
      private java.io.Readerreader 
      private booleanusePrevious 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONTokener(java.io.InputStream inputStream) +
      Construct a JSONTokener from an InputStream.
      +
      JSONTokener(java.io.Reader reader) +
      Construct a JSONTokener from a Reader.
      +
      JSONTokener(java.lang.String s) +
      Construct a JSONTokener from a string.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidback() +
      Back up one character.
      +
      static intdehexchar(char c) +
      Get the hex value of a character (base16).
      +
      booleanend() 
      booleanmore() +
      Determine if the source string still contains characters that next() + can consume.
      +
      charnext() +
      Get the next character in the source string.
      +
      charnext(char c) +
      Consume the next character, and check that it matches a specified + character.
      +
      java.lang.Stringnext(int n) +
      Get the next n characters.
      +
      charnextClean() +
      Get the next char in the string, skipping whitespace.
      +
      java.lang.StringnextString(char quote) +
      Return the characters up to the next close quote character.
      +
      java.lang.StringnextTo(char delimiter) +
      Get the text up but not including the specified character or the + end of line, whichever comes first.
      +
      java.lang.StringnextTo(java.lang.String delimiters) +
      Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
      +
      java.lang.ObjectnextValue() +
      Get the next value.
      +
      charskipTo(char to) +
      Skip characters until the next character is the requested character.
      +
      JSONExceptionsyntaxError(java.lang.String message) +
      Make a JSONException to signal a syntax error.
      +
      java.lang.StringtoString() +
      Make a printable string of this JSONTokener.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        character

        +
        private long character
        +
      • +
      + + + +
        +
      • +

        eof

        +
        private boolean eof
        +
      • +
      + + + +
        +
      • +

        index

        +
        private long index
        +
      • +
      + + + +
        +
      • +

        line

        +
        private long line
        +
      • +
      + + + +
        +
      • +

        previous

        +
        private char previous
        +
      • +
      + + + +
        +
      • +

        reader

        +
        private java.io.Reader reader
        +
      • +
      + + + +
        +
      • +

        usePrevious

        +
        private boolean usePrevious
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONTokener

        +
        public JSONTokener(java.io.Reader reader)
        +
        Construct a JSONTokener from a Reader.
        +
        +
        Parameters:
        +
        reader - A reader.
        +
        +
      • +
      + + + +
        +
      • +

        JSONTokener

        +
        public JSONTokener(java.io.InputStream inputStream)
        +            throws JSONException
        +
        Construct a JSONTokener from an InputStream.
        +
        +
        Parameters:
        +
        inputStream - The source.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        JSONTokener

        +
        public JSONTokener(java.lang.String s)
        +
        Construct a JSONTokener from a string.
        +
        +
        Parameters:
        +
        s - A source string.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        back

        +
        public void back()
        +          throws JSONException
        +
        Back up one character. This provides a sort of lookahead capability, + so that you can test for a digit or letter before attempting to parse + the next number or identifier.
        +
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        dehexchar

        +
        public static int dehexchar(char c)
        +
        Get the hex value of a character (base16).
        +
        +
        Parameters:
        +
        c - A character between '0' and '9' or between 'A' and 'F' or + between 'a' and 'f'.
        +
        Returns:
        +
        An int between 0 and 15, or -1 if c was not a hex digit.
        +
        +
      • +
      + + + +
        +
      • +

        end

        +
        public boolean end()
        +
      • +
      + + + +
        +
      • +

        more

        +
        public boolean more()
        +             throws JSONException
        +
        Determine if the source string still contains characters that next() + can consume.
        +
        +
        Returns:
        +
        true if not yet at the end of the source.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public char next()
        +          throws JSONException
        +
        Get the next character in the source string.
        +
        +
        Returns:
        +
        The next character, or 0 if past the end of the source string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public char next(char c)
        +          throws JSONException
        +
        Consume the next character, and check that it matches a specified + character.
        +
        +
        Parameters:
        +
        c - The character to match.
        +
        Returns:
        +
        The character.
        +
        Throws:
        +
        JSONException - if the character does not match.
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public java.lang.String next(int n)
        +                      throws JSONException
        +
        Get the next n characters.
        +
        +
        Parameters:
        +
        n - The number of characters to take.
        +
        Returns:
        +
        A string of n characters.
        +
        Throws:
        +
        JSONException - Substring bounds error if there are not + n characters remaining in the source string.
        +
        +
      • +
      + + + +
        +
      • +

        nextClean

        +
        public char nextClean()
        +               throws JSONException
        +
        Get the next char in the string, skipping whitespace.
        +
        +
        Returns:
        +
        A character, or 0 if there are no more characters.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        nextString

        +
        public java.lang.String nextString(char quote)
        +                            throws JSONException
        +
        Return the characters up to the next close quote character. + Backslash processing is done. The formal JSON format does not + allow strings in single quotes, but an implementation is allowed to + accept them.
        +
        +
        Parameters:
        +
        quote - The quoting character, either + " (double quote) or + ' (single quote).
        +
        Returns:
        +
        A String.
        +
        Throws:
        +
        JSONException - Unterminated string.
        +
        +
      • +
      + + + +
        +
      • +

        nextTo

        +
        public java.lang.String nextTo(char delimiter)
        +                        throws JSONException
        +
        Get the text up but not including the specified character or the + end of line, whichever comes first.
        +
        +
        Parameters:
        +
        delimiter - A delimiter character.
        +
        Returns:
        +
        A string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        nextTo

        +
        public java.lang.String nextTo(java.lang.String delimiters)
        +                        throws JSONException
        +
        Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
        +
        +
        Parameters:
        +
        delimiters - A set of delimiter characters.
        +
        Returns:
        +
        A string, trimmed.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        nextValue

        +
        public java.lang.Object nextValue()
        +                           throws JSONException
        +
        Get the next value. The value can be a Boolean, Double, Integer, + JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
        +
        +
        Returns:
        +
        An object.
        +
        Throws:
        +
        JSONException - If syntax error.
        +
        +
      • +
      + + + +
        +
      • +

        skipTo

        +
        public char skipTo(char to)
        +            throws JSONException
        +
        Skip characters until the next character is the requested character. + If the requested character is not found, no characters are skipped.
        +
        +
        Parameters:
        +
        to - A character to skip to.
        +
        Returns:
        +
        The requested character, or zero if the requested character + is not found.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        syntaxError

        +
        public JSONException syntaxError(java.lang.String message)
        +
        Make a JSONException to signal a syntax error.
        +
        +
        Parameters:
        +
        message - The error message.
        +
        Returns:
        +
        A JSONException object, suitable for throwing
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Make a printable string of this JSONTokener.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        " at {index} [character {character} line {line}]"
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/JSONWriter.html b/doc/org/json/JSONWriter.html new file mode 100644 index 000000000..93c708b6f --- /dev/null +++ b/doc/org/json/JSONWriter.html @@ -0,0 +1,752 @@ + + + + + +JSONWriter + + + + + + + + + + + + +
+
org.json
+

Class JSONWriter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.JSONWriter
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    JSONStringer
    +
    +
    +
    +
    public class JSONWriter
    +extends java.lang.Object
    +
    JSONWriter provides a quick and convenient way of producing JSON text. + The texts produced strictly conform to JSON syntax rules. No whitespace is + added, so the results are ready for transmission or storage. Each instance of + JSONWriter can produce one JSON text. +

    + A JSONWriter instance provides a value method for appending + values to the + text, and a key + method for adding keys before values in objects. There are array + and endArray methods that make and bound array values, and + object and endObject methods which make and bound + object values. All of these methods return the JSONWriter instance, + permitting a cascade style. For example,

    + new JSONWriter(myWriter)
    +     .object()
    +         .key("JSON")
    +         .value("Hello, World!")
    +     .endObject();
    which writes
    + {"JSON":"Hello, World!"}
    +

    + The first method called must be array or object. + There are no methods for adding commas or colons. JSONWriter adds them for + you. Objects and arrays can be nested up to 20 levels deep. +

    + This can sometimes be easier than using a JSONObject to build a string.

    +
    +
    Version:
    +
    2011-11-24
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      private booleancomma +
      The comma flag determines if a comma should be output before the next + value.
      +
      private static intmaxdepth 
      protected charmode +
      The current mode.
      +
      private JSONObject[]stack +
      The object/array stack.
      +
      private inttop +
      The stack top index.
      +
      protected java.io.Writerwriter +
      The writer that will receive the output.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JSONWriter(java.io.Writer w) +
      Make a fresh JSONWriter.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        comma

        +
        private boolean comma
        +
        The comma flag determines if a comma should be output before the next + value.
        +
      • +
      + + + +
        +
      • +

        mode

        +
        protected char mode
        +
        The current mode. Values: + 'a' (array), + 'd' (done), + 'i' (initial), + 'k' (key), + 'o' (object).
        +
      • +
      + + + +
        +
      • +

        stack

        +
        private final JSONObject[] stack
        +
        The object/array stack.
        +
      • +
      + + + +
        +
      • +

        top

        +
        private int top
        +
        The stack top index. A value of 0 indicates that the stack is empty.
        +
      • +
      + + + +
        +
      • +

        writer

        +
        protected java.io.Writer writer
        +
        The writer that will receive the output.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JSONWriter

        +
        public JSONWriter(java.io.Writer w)
        +
        Make a fresh JSONWriter. It can be used to build one JSON text.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        append

        +
        private JSONWriter append(java.lang.String string)
        +                   throws JSONException
        +
        Append a value.
        +
        +
        Parameters:
        +
        string - A string value.
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the value is out of sequence.
        +
        +
      • +
      + + + +
        +
      • +

        array

        +
        public JSONWriter array()
        +                 throws JSONException
        +
        Begin appending a new array. All values until the balancing + endArray will be appended to this array. The + endArray method must be called to mark the array's end.
        +
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the nesting is too deep, or if the object is + started in the wrong place (for example as a key or after the end of the + outermost array or object).
        +
        +
      • +
      + + + +
        +
      • +

        end

        +
        private JSONWriter end(char mode,
        +                       char c)
        +                throws JSONException
        +
        End something.
        +
        +
        Parameters:
        +
        mode - Mode
        +
        c - Closing character
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If unbalanced.
        +
        +
      • +
      + + + +
        +
      • +

        endArray

        +
        public JSONWriter endArray()
        +                    throws JSONException
        +
        End an array. This method most be called to balance calls to + array.
        +
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If incorrectly nested.
        +
        +
      • +
      + + + +
        +
      • +

        endObject

        +
        public JSONWriter endObject()
        +                     throws JSONException
        +
        End an object. This method most be called to balance calls to + object.
        +
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If incorrectly nested.
        +
        +
      • +
      + + + +
        +
      • +

        key

        +
        public JSONWriter key(java.lang.String string)
        +               throws JSONException
        +
        Append a key. The key will be associated with the next value. In an + object, every value must be preceded by a key.
        +
        +
        Parameters:
        +
        string - A key string.
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the key is out of place. For example, keys + do not belong in arrays or if the key is null.
        +
        +
      • +
      + + + +
        +
      • +

        object

        +
        public JSONWriter object()
        +                  throws JSONException
        +
        Begin appending a new object. All keys and values until the balancing + endObject will be appended to this object. The + endObject method must be called to mark the object's end.
        +
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the nesting is too deep, or if the object is + started in the wrong place (for example as a key or after the end of the + outermost array or object).
        +
        +
      • +
      + + + +
        +
      • +

        pop

        +
        private void pop(char c)
        +          throws JSONException
        +
        Pop an array or object scope.
        +
        +
        Parameters:
        +
        c - The scope to close.
        +
        Throws:
        +
        JSONException - If nesting is wrong.
        +
        +
      • +
      + + + +
        +
      • +

        push

        +
        private void push(JSONObject jo)
        +           throws JSONException
        +
        Push an array or object scope.
        +
        +
        Parameters:
        +
        jo - The scope to open.
        +
        Throws:
        +
        JSONException - If nesting is too deep.
        +
        +
      • +
      + + + +
        +
      • +

        value

        +
        public JSONWriter value(boolean b)
        +                 throws JSONException
        +
        Append either the value true or the value + false.
        +
        +
        Parameters:
        +
        b - A boolean.
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        value

        +
        public JSONWriter value(double d)
        +                 throws JSONException
        +
        Append a double value.
        +
        +
        Parameters:
        +
        d - A double.
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the number is not finite.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        value

        +
        public JSONWriter value(java.lang.Object object)
        +                 throws JSONException
        +
        Append an object value.
        +
        +
        Parameters:
        +
        object - The object to append. It can be null, or a Boolean, Number, + String, JSONObject, or JSONArray, or an object that implements JSONString.
        +
        Returns:
        +
        this
        +
        Throws:
        +
        JSONException - If the value is out of sequence.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/Property.html b/doc/org/json/Property.html new file mode 100644 index 000000000..e94d91375 --- /dev/null +++ b/doc/org/json/Property.html @@ -0,0 +1,313 @@ + + + + + +Property + + + + + + + + + + + + +
+
org.json
+

Class Property

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.Property
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Property
    +extends java.lang.Object
    +
    Converts a Property file data into JSONObject and back.
    +
    +
    Version:
    +
    2015-05-05
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Property() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static JSONObjecttoJSONObject(java.util.Properties properties) +
      Converts a property file object into a JSONObject.
      +
      static java.util.PropertiestoProperties(JSONObject jo) +
      Converts the JSONObject into a property file object.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Property

        +
        public Property()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.util.Properties properties)
        +                               throws JSONException
        +
        Converts a property file object into a JSONObject. The property file object is a table of name value pairs.
        +
        +
        Parameters:
        +
        properties - java.util.Properties
        +
        Returns:
        +
        JSONObject
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toProperties

        +
        public static java.util.Properties toProperties(JSONObject jo)
        +                                         throws JSONException
        +
        Converts the JSONObject into a property file object.
        +
        +
        Parameters:
        +
        jo - JSONObject
        +
        Returns:
        +
        java.util.Properties
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/XML.html b/doc/org/json/XML.html new file mode 100644 index 000000000..0c50cb941 --- /dev/null +++ b/doc/org/json/XML.html @@ -0,0 +1,633 @@ + + + + + +XML + + + + + + + + + + + + +
+
org.json
+

Class XML

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.json.XML
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class XML
    +extends java.lang.Object
    +
    This provides static methods to convert an XML text into a JSONObject, + and to covert a JSONObject into an XML text.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static java.lang.CharacterAMP +
      The Character '&'.
      +
      static java.lang.CharacterAPOS +
      The Character '''.
      +
      static java.lang.CharacterBANG +
      The Character '!'.
      +
      static java.lang.CharacterEQ +
      The Character '='.
      +
      static java.lang.CharacterGT +
      The Character '>'.
      +
      static java.lang.CharacterLT +
      The Character '<'.
      +
      static java.lang.CharacterQUEST +
      The Character '?'.
      +
      static java.lang.CharacterQUOT +
      The Character '"'.
      +
      static java.lang.CharacterSLASH +
      The Character '/'.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XML() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.lang.Stringescape(java.lang.String string) +
      Replace special characters with XML escapes: + + & (ampersand) is replaced by &amp; + < (less than) is replaced by &lt; + > (greater than) is replaced by &gt; + " (double quote) is replaced by &quot; +
      +
      static voidnoSpace(java.lang.String string) +
      Throw an exception if the string contains whitespace.
      +
      private static booleanparse(XMLTokener x, + JSONObject context, + java.lang.String name) +
      Scan the content following the named tag, attaching it to the context.
      +
      static java.lang.ObjectstringToValue(java.lang.String string) +
      Try to convert a string into a number, boolean, or null.
      +
      static JSONObjecttoJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
      +
      static java.lang.StringtoString(java.lang.Object object) +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      static java.lang.StringtoString(java.lang.Object object, + java.lang.String tagName) +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        AMP

        +
        public static final java.lang.Character AMP
        +
        The Character '&'.
        +
      • +
      + + + +
        +
      • +

        APOS

        +
        public static final java.lang.Character APOS
        +
        The Character '''.
        +
      • +
      + + + +
        +
      • +

        BANG

        +
        public static final java.lang.Character BANG
        +
        The Character '!'.
        +
      • +
      + + + +
        +
      • +

        EQ

        +
        public static final java.lang.Character EQ
        +
        The Character '='.
        +
      • +
      + + + +
        +
      • +

        GT

        +
        public static final java.lang.Character GT
        +
        The Character '>'.
        +
      • +
      + + + +
        +
      • +

        LT

        +
        public static final java.lang.Character LT
        +
        The Character '<'.
        +
      • +
      + + + +
        +
      • +

        QUEST

        +
        public static final java.lang.Character QUEST
        +
        The Character '?'.
        +
      • +
      + + + +
        +
      • +

        QUOT

        +
        public static final java.lang.Character QUOT
        +
        The Character '"'.
        +
      • +
      + + + +
        +
      • +

        SLASH

        +
        public static final java.lang.Character SLASH
        +
        The Character '/'.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XML

        +
        public XML()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        escape

        +
        public static java.lang.String escape(java.lang.String string)
        +
        Replace special characters with XML escapes: +
        + & (ampersand) is replaced by &amp;
        + < (less than) is replaced by &lt;
        + > (greater than) is replaced by &gt;
        + " (double quote) is replaced by &quot;
        + 
        +
        +
        Parameters:
        +
        string - The string to be escaped.
        +
        Returns:
        +
        The escaped string.
        +
        +
      • +
      + + + +
        +
      • +

        noSpace

        +
        public static void noSpace(java.lang.String string)
        +                    throws JSONException
        +
        Throw an exception if the string contains whitespace. + Whitespace is not allowed in tagNames and attributes.
        +
        +
        Parameters:
        +
        string - A string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        parse

        +
        private static boolean parse(XMLTokener x,
        +                             JSONObject context,
        +                             java.lang.String name)
        +                      throws JSONException
        +
        Scan the content following the named tag, attaching it to the context.
        +
        +
        Parameters:
        +
        x - The XMLTokener containing the source string.
        +
        context - The JSONObject that will include the new material.
        +
        name - The tag name.
        +
        Returns:
        +
        true if the close tag is processed.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        stringToValue

        +
        public static java.lang.Object stringToValue(java.lang.String string)
        +
        Try to convert a string into a number, boolean, or null. If the string + can't be converted, return the string. This is much less ambitious than + JSONObject.stringToValue, especially because it does not attempt to + convert plus forms, octal forms, hex forms, or E forms lacking decimal + points.
        +
        +
        Parameters:
        +
        string - A String.
        +
        Returns:
        +
        A simple JSON value.
        +
        +
      • +
      + + + +
        +
      • +

        toJSONObject

        +
        public static JSONObject toJSONObject(java.lang.String string)
        +                               throws JSONException
        +
        Convert a well-formed (but not necessarily valid) XML string into a + JSONObject. Some information may be lost in this transformation + because JSON is a data format and XML is a document format. XML uses + elements, attributes, and content text, while JSON uses unordered + collections of name/value pairs and arrays of values. JSON does not + does not like to distinguish between elements and attributes. + Sequences of similar elements are represented as JSONArrays. Content + text may be placed in a "content" member. Comments, prologs, DTDs, and + <[ [ ]]> are ignored.
        +
        +
        Parameters:
        +
        string - The source string.
        +
        Returns:
        +
        A JSONObject containing the structured data from the XML string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(java.lang.Object object)
        +                                 throws JSONException
        +
        Convert a JSONObject into a well-formed, element-normal XML string.
        +
        +
        Parameters:
        +
        object - A JSONObject.
        +
        Returns:
        +
        A string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(java.lang.Object object,
        +                                        java.lang.String tagName)
        +                                 throws JSONException
        +
        Convert a JSONObject into a well-formed, element-normal XML string.
        +
        +
        Parameters:
        +
        object - A JSONObject.
        +
        tagName - The optional name of the enclosing tag.
        +
        Returns:
        +
        A string.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/XMLTokener.html b/doc/org/json/XMLTokener.html new file mode 100644 index 000000000..99622209d --- /dev/null +++ b/doc/org/json/XMLTokener.html @@ -0,0 +1,475 @@ + + + + + +XMLTokener + + + + + + + + + + + + +
+
org.json
+

Class XMLTokener

+
+
+ +
+
    +
  • +
    +
    +
    public class XMLTokener
    +extends JSONTokener
    +
    The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
    +
    +
    Version:
    +
    2014-05-03
    +
    Author:
    +
    JSON.org
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static java.util.HashMap<java.lang.String,java.lang.Character>entity +
      The table of entity values.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XMLTokener(java.lang.String s) +
      Construct an XMLTokener from a string.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        entity

        +
        public static final java.util.HashMap<java.lang.String,java.lang.Character> entity
        +
        The table of entity values. It initially contains Character values for + amp, apos, gt, lt, quot.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XMLTokener

        +
        public XMLTokener(java.lang.String s)
        +
        Construct an XMLTokener from a string.
        +
        +
        Parameters:
        +
        s - A source string.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        nextCDATA

        +
        public java.lang.String nextCDATA()
        +                           throws JSONException
        +
        Get the text in the CDATA block.
        +
        +
        Returns:
        +
        The string up to the ]]>.
        +
        Throws:
        +
        JSONException - If the ]]> is not found.
        +
        +
      • +
      + + + +
        +
      • +

        nextContent

        +
        public java.lang.Object nextContent()
        +                             throws JSONException
        +
        Get the next XML outer token, trimming whitespace. There are two kinds + of tokens: the '<' character which begins a markup tag, and the content + text between markup tags.
        +
        +
        Returns:
        +
        A string, or a '<' Character, or null if there is no more + source text.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      + + + +
        +
      • +

        nextEntity

        +
        public java.lang.Object nextEntity(char ampersand)
        +                            throws JSONException
        +
        Return the next entity. These entities are translated to Characters: + & ' > < ".
        +
        +
        Parameters:
        +
        ampersand - An ampersand character.
        +
        Returns:
        +
        A Character or an entity String if the entity is not recognized.
        +
        Throws:
        +
        JSONException - If missing ';' in XML entity.
        +
        +
      • +
      + + + +
        +
      • +

        nextMeta

        +
        public java.lang.Object nextMeta()
        +                          throws JSONException
        +
        Returns the next XML meta token. This is used for skipping over + and structures.
        +
        +
        Returns:
        +
        Syntax characters (< > / = ! ?) are returned as + Character, and strings and names are returned as Boolean. We don't care + what the values actually are.
        +
        Throws:
        +
        JSONException - If a string is not properly closed or if the XML + is badly structured.
        +
        +
      • +
      + + + +
        +
      • +

        nextToken

        +
        public java.lang.Object nextToken()
        +                           throws JSONException
        +
        Get the next XML Token. These tokens are found inside of angle + brackets. It may be one of these characters: / > = ! ? or it + may be a string wrapped in single quotes or double quotes, or it may be a + name.
        +
        +
        Returns:
        +
        a String or a Character.
        +
        Throws:
        +
        JSONException - If the XML is not well formed.
        +
        +
      • +
      + + + +
        +
      • +

        skipPast

        +
        public boolean skipPast(java.lang.String to)
        +                 throws JSONException
        +
        Skip characters until past the requested string. + If it is not found, we are left at the end of the source with a result of false.
        +
        +
        Parameters:
        +
        to - A string to skip past.
        +
        Throws:
        +
        JSONException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/org/json/class-use/CDL.html b/doc/org/json/class-use/CDL.html new file mode 100644 index 000000000..3793a81e7 --- /dev/null +++ b/doc/org/json/class-use/CDL.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.CDL + + + + + + + + + + + +
+

Uses of Class
org.json.CDL

+
+
No usage of org.json.CDL
+ + + + + + diff --git a/doc/org/json/class-use/Cookie.html b/doc/org/json/class-use/Cookie.html new file mode 100644 index 000000000..808b07d76 --- /dev/null +++ b/doc/org/json/class-use/Cookie.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.Cookie + + + + + + + + + + + +
+

Uses of Class
org.json.Cookie

+
+
No usage of org.json.Cookie
+ + + + + + diff --git a/doc/org/json/class-use/CookieList.html b/doc/org/json/class-use/CookieList.html new file mode 100644 index 000000000..278da3120 --- /dev/null +++ b/doc/org/json/class-use/CookieList.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.CookieList + + + + + + + + + + + +
+

Uses of Class
org.json.CookieList

+
+
No usage of org.json.CookieList
+ + + + + + diff --git a/doc/org/json/class-use/HTTP.html b/doc/org/json/class-use/HTTP.html new file mode 100644 index 000000000..2808b6dd4 --- /dev/null +++ b/doc/org/json/class-use/HTTP.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.HTTP + + + + + + + + + + + +
+

Uses of Class
org.json.HTTP

+
+
No usage of org.json.HTTP
+ + + + + + diff --git a/doc/org/json/class-use/HTTPTokener.html b/doc/org/json/class-use/HTTPTokener.html new file mode 100644 index 000000000..0c9f62a83 --- /dev/null +++ b/doc/org/json/class-use/HTTPTokener.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.HTTPTokener + + + + + + + + + + + +
+

Uses of Class
org.json.HTTPTokener

+
+
No usage of org.json.HTTPTokener
+ + + + + + diff --git a/doc/org/json/class-use/JSONArray.html b/doc/org/json/class-use/JSONArray.html new file mode 100644 index 000000000..4d5cd7adb --- /dev/null +++ b/doc/org/json/class-use/JSONArray.html @@ -0,0 +1,407 @@ + + + + + +Uses of Class org.json.JSONArray + + + + + + + + + + + +
+

Uses of Class
org.json.JSONArray

+
+
+
    +
  • +
      +
    • + + +

      Uses of JSONArray in org.json

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json that return JSONArray 
      Modifier and TypeMethod and Description
      JSONArrayJSONArray.getJSONArray(int index) +
      Get the JSONArray associated with an index.
      +
      JSONArrayJSONObject.getJSONArray(java.lang.String key) +
      Get the JSONArray value associated with a key.
      +
      JSONArrayJSONObject.names() +
      Produce a JSONArray containing the names of the elements of this + JSONObject.
      +
      JSONArrayJSONArray.optJSONArray(int index) +
      Get the optional JSONArray associated with an index.
      +
      JSONArrayJSONObject.optJSONArray(java.lang.String key) +
      Get an optional JSONArray associated with a key.
      +
      JSONArrayJSONArray.put(boolean value) +
      Append a boolean value.
      +
      JSONArrayJSONArray.put(java.util.Collection<java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      JSONArrayJSONArray.put(double value) +
      Append a double value.
      +
      JSONArrayJSONArray.put(int value) +
      Append an int value.
      +
      JSONArrayJSONArray.put(int index, + boolean value) +
      Put or replace a boolean value in the JSONArray.
      +
      JSONArrayJSONArray.put(int index, + java.util.Collection<java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      JSONArrayJSONArray.put(int index, + double value) +
      Put or replace a double value.
      +
      JSONArrayJSONArray.put(int index, + int value) +
      Put or replace an int value.
      +
      JSONArrayJSONArray.put(int index, + long value) +
      Put or replace a long value.
      +
      JSONArrayJSONArray.put(int index, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
      +
      JSONArrayJSONArray.put(int index, + java.lang.Object value) +
      Put or replace an object value in the JSONArray.
      +
      JSONArrayJSONArray.put(long value) +
      Append an long value.
      +
      JSONArrayJSONArray.put(java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
      +
      JSONArrayJSONArray.put(java.lang.Object value) +
      Append an object value.
      +
      static JSONArrayCDL.rowToJSONArray(JSONTokener x) +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      JSONArrayJSONObject.toJSONArray(JSONArray names) +
      Produce a JSONArray containing the values of the members of this + JSONObject.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static JSONArrayJSONML.toJSONArray(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      static JSONArrayCDL.toJSONArray(java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static JSONArrayJSONML.toJSONArray(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json with parameters of type JSONArray 
      Modifier and TypeMethod and Description
      private static java.lang.ObjectJSONML.parse(XMLTokener x, + boolean arrayForm, + JSONArray ja) +
      Parse XML values and store them in a JSONArray.
      +
      static JSONObjectCDL.rowToJSONObject(JSONArray names, + JSONTokener x) +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      static java.lang.StringCDL.rowToString(JSONArray ja) +
      Produce a comma delimited text row from a JSONArray.
      +
      JSONArrayJSONObject.toJSONArray(JSONArray names) +
      Produce a JSONArray containing the values of the members of this + JSONObject.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      JSONObjectJSONArray.toJSONObject(JSONArray names) +
      Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
      +
      static java.lang.StringJSONML.toString(JSONArray ja) +
      Reverse the JSONML transformation, making an XML text from a JSONArray.
      +
      static java.lang.StringCDL.toString(JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects.
      +
      static java.lang.StringCDL.toString(JSONArray names, + JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/class-use/JSONException.html b/doc/org/json/class-use/JSONException.html new file mode 100644 index 000000000..252e47ddb --- /dev/null +++ b/doc/org/json/class-use/JSONException.html @@ -0,0 +1,952 @@ + + + + + +Uses of Class org.json.JSONException + + + + + + + + + + + +
+

Uses of Class
org.json.JSONException

+
+
+
    +
  • +
      +
    • + + +

      Uses of JSONException in org.json

      + + + + + + + + + + + + +
      Methods in org.json that return JSONException 
      Modifier and TypeMethod and Description
      JSONExceptionJSONTokener.syntaxError(java.lang.String message) +
      Make a JSONException to signal a syntax error.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json that throw JSONException 
      Modifier and TypeMethod and Description
      JSONObjectJSONObject.accumulate(java.lang.String key, + java.lang.Object value) +
      Accumulate values under a key.
      +
      private JSONWriterJSONWriter.append(java.lang.String string) +
      Append a value.
      +
      JSONObjectJSONObject.append(java.lang.String key, + java.lang.Object value) +
      Append values to the array under a key.
      +
      JSONWriterJSONWriter.array() +
      Begin appending a new array.
      +
      voidJSONTokener.back() +
      Back up one character.
      +
      private JSONWriterJSONWriter.end(char mode, + char c) +
      End something.
      +
      JSONWriterJSONWriter.endArray() +
      End an array.
      +
      JSONWriterJSONWriter.endObject() +
      End an object.
      +
      java.lang.ObjectJSONArray.get(int index) +
      Get the object value associated with an index.
      +
      java.lang.ObjectJSONObject.get(java.lang.String key) +
      Get the value object associated with a key.
      +
      java.math.BigDecimalJSONArray.getBigDecimal(int index) +
      Get the BigDecimal value associated with an index.
      +
      java.math.BigDecimalJSONObject.getBigDecimal(java.lang.String key) +
      Get the BigDecimal value associated with a key.
      +
      java.math.BigIntegerJSONArray.getBigInteger(int index) +
      Get the BigInteger value associated with an index.
      +
      java.math.BigIntegerJSONObject.getBigInteger(java.lang.String key) +
      Get the BigInteger value associated with a key.
      +
      booleanJSONArray.getBoolean(int index) +
      Get the boolean value associated with an index.
      +
      booleanJSONObject.getBoolean(java.lang.String key) +
      Get the boolean value associated with a key.
      +
      doubleJSONArray.getDouble(int index) +
      Get the double value associated with an index.
      +
      doubleJSONObject.getDouble(java.lang.String key) +
      Get the double value associated with a key.
      +
      <E extends java.lang.Enum<E>>
      E
      JSONArray.getEnum(java.lang.Class<E> clazz, + int index) +
      Get the enum value associated with an index.
      +
      <E extends java.lang.Enum<E>>
      E
      JSONObject.getEnum(java.lang.Class<E> clazz, + java.lang.String key) +
      Get the enum value associated with a key.
      +
      intJSONArray.getInt(int index) +
      Get the int value associated with an index.
      +
      intJSONObject.getInt(java.lang.String key) +
      Get the int value associated with a key.
      +
      JSONArrayJSONArray.getJSONArray(int index) +
      Get the JSONArray associated with an index.
      +
      JSONArrayJSONObject.getJSONArray(java.lang.String key) +
      Get the JSONArray value associated with a key.
      +
      JSONObjectJSONArray.getJSONObject(int index) +
      Get the JSONObject associated with an index.
      +
      JSONObjectJSONObject.getJSONObject(java.lang.String key) +
      Get the JSONObject value associated with a key.
      +
      longJSONArray.getLong(int index) +
      Get the long value associated with an index.
      +
      longJSONObject.getLong(java.lang.String key) +
      Get the long value associated with a key.
      +
      java.lang.StringJSONArray.getString(int index) +
      Get the string associated with an index.
      +
      java.lang.StringJSONObject.getString(java.lang.String key) +
      Get the string associated with a key.
      +
      private static java.lang.StringCDL.getValue(JSONTokener x) +
      Get the next value.
      +
      JSONObjectJSONObject.increment(java.lang.String key) +
      Increment a property of a JSONObject.
      +
      java.lang.StringJSONArray.join(java.lang.String separator) +
      Make a string from the contents of this JSONArray.
      +
      JSONWriterJSONWriter.key(java.lang.String string) +
      Append a key.
      +
      booleanJSONTokener.more() +
      Determine if the source string still contains characters that next() + can consume.
      +
      charJSONTokener.next() +
      Get the next character in the source string.
      +
      charJSONTokener.next(char c) +
      Consume the next character, and check that it matches a specified + character.
      +
      java.lang.StringJSONTokener.next(int n) +
      Get the next n characters.
      +
      java.lang.StringXMLTokener.nextCDATA() +
      Get the text in the CDATA block.
      +
      charJSONTokener.nextClean() +
      Get the next char in the string, skipping whitespace.
      +
      java.lang.ObjectXMLTokener.nextContent() +
      Get the next XML outer token, trimming whitespace.
      +
      java.lang.ObjectXMLTokener.nextEntity(char ampersand) +
      Return the next entity.
      +
      java.lang.ObjectXMLTokener.nextMeta() +
      Returns the next XML meta token.
      +
      java.lang.StringJSONTokener.nextString(char quote) +
      Return the characters up to the next close quote character.
      +
      java.lang.StringJSONTokener.nextTo(char delimiter) +
      Get the text up but not including the specified character or the + end of line, whichever comes first.
      +
      java.lang.StringJSONTokener.nextTo(java.lang.String delimiters) +
      Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
      +
      java.lang.ObjectXMLTokener.nextToken() +
      Get the next XML Token.
      +
      java.lang.StringHTTPTokener.nextToken() +
      Get the next token or string.
      +
      java.lang.ObjectJSONTokener.nextValue() +
      Get the next value.
      +
      static voidXML.noSpace(java.lang.String string) +
      Throw an exception if the string contains whitespace.
      +
      static java.lang.StringJSONObject.numberToString(java.lang.Number number) +
      Produce a string from a Number.
      +
      JSONWriterJSONWriter.object() +
      Begin appending a new object.
      +
      private static java.lang.ObjectJSONML.parse(XMLTokener x, + boolean arrayForm, + JSONArray ja) +
      Parse XML values and store them in a JSONArray.
      +
      private static booleanXML.parse(XMLTokener x, + JSONObject context, + java.lang.String name) +
      Scan the content following the named tag, attaching it to the context.
      +
      private voidJSONWriter.pop(char c) +
      Pop an array or object scope.
      +
      private voidJSONWriter.push(JSONObject jo) +
      Push an array or object scope.
      +
      JSONArrayJSONArray.put(double value) +
      Append a double value.
      +
      JSONArrayJSONArray.put(int index, + boolean value) +
      Put or replace a boolean value in the JSONArray.
      +
      JSONArrayJSONArray.put(int index, + java.util.Collection<java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      JSONArrayJSONArray.put(int index, + double value) +
      Put or replace a double value.
      +
      JSONArrayJSONArray.put(int index, + int value) +
      Put or replace an int value.
      +
      JSONArrayJSONArray.put(int index, + long value) +
      Put or replace a long value.
      +
      JSONArrayJSONArray.put(int index, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
      +
      JSONArrayJSONArray.put(int index, + java.lang.Object value) +
      Put or replace an object value in the JSONArray.
      +
      JSONObjectJSONObject.put(java.lang.String key, + boolean value) +
      Put a key/boolean pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.util.Collection<java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
      +
      JSONObjectJSONObject.put(java.lang.String key, + double value) +
      Put a key/double pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + int value) +
      Put a key/int pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + long value) +
      Put a key/long pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject.
      +
      JSONObjectJSONObject.putOnce(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
      +
      JSONObjectJSONObject.putOpt(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
      +
      static JSONArrayCDL.rowToJSONArray(JSONTokener x) +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      static JSONObjectCDL.rowToJSONObject(JSONArray names, + JSONTokener x) +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      booleanXMLTokener.skipPast(java.lang.String to) +
      Skip characters until past the requested string.
      +
      charJSONTokener.skipTo(char to) +
      Skip characters until the next character is the requested character.
      +
      static voidJSONObject.testValidity(java.lang.Object o) +
      Throw an exception if the object is a NaN or infinite number.
      +
      JSONArrayJSONObject.toJSONArray(JSONArray names) +
      Produce a JSONArray containing the values of the members of this + JSONObject.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static JSONArrayJSONML.toJSONArray(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      static JSONArrayCDL.toJSONArray(java.lang.String string) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      static JSONArrayJSONML.toJSONArray(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      JSONObjectJSONArray.toJSONObject(JSONArray names) +
      Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
      +
      static JSONObjectProperty.toJSONObject(java.util.Properties properties) +
      Converts a property file object into a JSONObject.
      +
      static JSONObjectXML.toJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
      +
      static JSONObjectJSONML.toJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      static JSONObjectHTTP.toJSONObject(java.lang.String string) +
      Convert an HTTP header string into a JSONObject.
      +
      static JSONObjectCookieList.toJSONObject(java.lang.String string) +
      Convert a cookie list into a JSONObject.
      +
      static JSONObjectCookie.toJSONObject(java.lang.String string) +
      Convert a cookie specification string into a JSONObject.
      +
      static JSONObjectJSONML.toJSONObject(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      static java.util.PropertiesProperty.toProperties(JSONObject jo) +
      Converts the JSONObject into a property file object.
      +
      java.lang.StringJSONObject.toString(int indentFactor) +
      Make a prettyprinted JSON text of this JSONObject.
      +
      java.lang.StringJSONArray.toString(int indentFactor) +
      Make a prettyprinted JSON text of this JSONArray.
      +
      static java.lang.StringJSONML.toString(JSONArray ja) +
      Reverse the JSONML transformation, making an XML text from a JSONArray.
      +
      static java.lang.StringCDL.toString(JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects.
      +
      static java.lang.StringCDL.toString(JSONArray names, + JSONArray ja) +
      Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
      +
      static java.lang.StringJSONML.toString(JSONObject jo) +
      Reverse the JSONML transformation, making an XML text from a JSONObject.
      +
      static java.lang.StringHTTP.toString(JSONObject jo) +
      Convert a JSONObject into an HTTP header.
      +
      static java.lang.StringCookieList.toString(JSONObject jo) +
      Convert a JSONObject into a cookie list.
      +
      static java.lang.StringCookie.toString(JSONObject jo) +
      Convert a JSONObject into a cookie specification string.
      +
      static java.lang.StringXML.toString(java.lang.Object object) +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      static java.lang.StringXML.toString(java.lang.Object object, + java.lang.String tagName) +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      JSONWriterJSONWriter.value(boolean b) +
      Append either the value true or the value + false.
      +
      JSONWriterJSONWriter.value(double d) +
      Append a double value.
      +
      JSONWriterJSONWriter.value(long l) +
      Append a long value.
      +
      JSONWriterJSONWriter.value(java.lang.Object object) +
      Append an object value.
      +
      static java.lang.StringJSONObject.valueToString(java.lang.Object value) +
      Make a JSON text of an Object value.
      +
      java.io.WriterJSONObject.write(java.io.Writer writer) +
      Write the contents of the JSONObject as JSON text to a writer.
      +
      java.io.WriterJSONArray.write(java.io.Writer writer) +
      Write the contents of the JSONArray as JSON text to a writer.
      +
      (package private) java.io.WriterJSONObject.write(java.io.Writer writer, + int indentFactor, + int indent) +
      Write the contents of the JSONObject as JSON text to a writer.
      +
      (package private) java.io.WriterJSONArray.write(java.io.Writer writer, + int indentFactor, + int indent) +
      Write the contents of the JSONArray as JSON text to a writer.
      +
      (package private) static java.io.WriterJSONObject.writeValue(java.io.Writer writer, + java.lang.Object value, + int indentFactor, + int indent) 
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors in org.json that throw JSONException 
      Constructor and Description
      JSONArray(JSONTokener x) +
      Construct a JSONArray from a JSONTokener.
      +
      JSONArray(java.lang.Object array) +
      Construct a JSONArray from an array
      +
      JSONArray(java.lang.String source) +
      Construct a JSONArray from a source JSON text.
      +
      JSONObject(JSONTokener x) +
      Construct a JSONObject from a JSONTokener.
      +
      JSONObject(java.lang.String source) +
      Construct a JSONObject from a source JSON text string.
      +
      JSONObject(java.lang.String baseName, + java.util.Locale locale) +
      Construct a JSONObject from a ResourceBundle.
      +
      JSONTokener(java.io.InputStream inputStream) +
      Construct a JSONTokener from an InputStream.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/class-use/JSONML.html b/doc/org/json/class-use/JSONML.html new file mode 100644 index 000000000..d1a784c23 --- /dev/null +++ b/doc/org/json/class-use/JSONML.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.JSONML + + + + + + + + + + + +
+

Uses of Class
org.json.JSONML

+
+
No usage of org.json.JSONML
+ + + + + + diff --git a/doc/org/json/class-use/JSONObject.Null.html b/doc/org/json/class-use/JSONObject.Null.html new file mode 100644 index 000000000..1b7019827 --- /dev/null +++ b/doc/org/json/class-use/JSONObject.Null.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.JSONObject.Null + + + + + + + + + + + +
+

Uses of Class
org.json.JSONObject.Null

+
+
No usage of org.json.JSONObject.Null
+ + + + + + diff --git a/doc/org/json/class-use/JSONObject.html b/doc/org/json/class-use/JSONObject.html new file mode 100644 index 000000000..645a1634b --- /dev/null +++ b/doc/org/json/class-use/JSONObject.html @@ -0,0 +1,403 @@ + + + + + +Uses of Class org.json.JSONObject + + + + + + + + + + + +
+

Uses of Class
org.json.JSONObject

+
+
+
    +
  • +
      +
    • + + +

      Uses of JSONObject in org.json

      + + + + + + + + + + + + +
      Fields in org.json declared as JSONObject 
      Modifier and TypeField and Description
      private JSONObject[]JSONWriter.stack +
      The object/array stack.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json that return JSONObject 
      Modifier and TypeMethod and Description
      JSONObjectJSONObject.accumulate(java.lang.String key, + java.lang.Object value) +
      Accumulate values under a key.
      +
      JSONObjectJSONObject.append(java.lang.String key, + java.lang.Object value) +
      Append values to the array under a key.
      +
      JSONObjectJSONArray.getJSONObject(int index) +
      Get the JSONObject associated with an index.
      +
      JSONObjectJSONObject.getJSONObject(java.lang.String key) +
      Get the JSONObject value associated with a key.
      +
      JSONObjectJSONObject.increment(java.lang.String key) +
      Increment a property of a JSONObject.
      +
      JSONObjectJSONArray.optJSONObject(int index) +
      Get the optional JSONObject associated with an index.
      +
      JSONObjectJSONObject.optJSONObject(java.lang.String key) +
      Get an optional JSONObject associated with a key.
      +
      JSONObjectJSONObject.put(java.lang.String key, + boolean value) +
      Put a key/boolean pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.util.Collection<java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
      +
      JSONObjectJSONObject.put(java.lang.String key, + double value) +
      Put a key/double pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + int value) +
      Put a key/int pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + long value) +
      Put a key/long pair in the JSONObject.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.util.Map<java.lang.String,java.lang.Object> value) +
      Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
      +
      JSONObjectJSONObject.put(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject.
      +
      JSONObjectJSONObject.putOnce(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
      +
      JSONObjectJSONObject.putOpt(java.lang.String key, + java.lang.Object value) +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
      +
      static JSONObjectCDL.rowToJSONObject(JSONArray names, + JSONTokener x) +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      JSONObjectJSONArray.toJSONObject(JSONArray names) +
      Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
      +
      static JSONObjectProperty.toJSONObject(java.util.Properties properties) +
      Converts a property file object into a JSONObject.
      +
      static JSONObjectXML.toJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
      +
      static JSONObjectJSONML.toJSONObject(java.lang.String string) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      static JSONObjectHTTP.toJSONObject(java.lang.String string) +
      Convert an HTTP header string into a JSONObject.
      +
      static JSONObjectCookieList.toJSONObject(java.lang.String string) +
      Convert a cookie list into a JSONObject.
      +
      static JSONObjectCookie.toJSONObject(java.lang.String string) +
      Convert a cookie specification string into a JSONObject.
      +
      static JSONObjectJSONML.toJSONObject(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json with parameters of type JSONObject 
      Modifier and TypeMethod and Description
      static java.lang.String[]JSONObject.getNames(JSONObject jo) +
      Get an array of field names from a JSONObject.
      +
      private static booleanXML.parse(XMLTokener x, + JSONObject context, + java.lang.String name) +
      Scan the content following the named tag, attaching it to the context.
      +
      private voidJSONWriter.push(JSONObject jo) +
      Push an array or object scope.
      +
      static java.util.PropertiesProperty.toProperties(JSONObject jo) +
      Converts the JSONObject into a property file object.
      +
      static java.lang.StringJSONML.toString(JSONObject jo) +
      Reverse the JSONML transformation, making an XML text from a JSONObject.
      +
      static java.lang.StringHTTP.toString(JSONObject jo) +
      Convert a JSONObject into an HTTP header.
      +
      static java.lang.StringCookieList.toString(JSONObject jo) +
      Convert a JSONObject into a cookie list.
      +
      static java.lang.StringCookie.toString(JSONObject jo) +
      Convert a JSONObject into a cookie specification string.
      +
      + + + + + + + + + + +
      Constructors in org.json with parameters of type JSONObject 
      Constructor and Description
      JSONObject(JSONObject jo, + java.lang.String[] names) +
      Construct a JSONObject from a subset of another JSONObject.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/class-use/JSONString.html b/doc/org/json/class-use/JSONString.html new file mode 100644 index 000000000..a4b939aea --- /dev/null +++ b/doc/org/json/class-use/JSONString.html @@ -0,0 +1,122 @@ + + + + + +Uses of Interface org.json.JSONString + + + + + + + + + + + +
+

Uses of Interface
org.json.JSONString

+
+
No usage of org.json.JSONString
+ + + + + + diff --git a/doc/org/json/class-use/JSONStringer.html b/doc/org/json/class-use/JSONStringer.html new file mode 100644 index 000000000..8c66eb972 --- /dev/null +++ b/doc/org/json/class-use/JSONStringer.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.JSONStringer + + + + + + + + + + + +
+

Uses of Class
org.json.JSONStringer

+
+
No usage of org.json.JSONStringer
+ + + + + + diff --git a/doc/org/json/class-use/JSONTokener.html b/doc/org/json/class-use/JSONTokener.html new file mode 100644 index 000000000..a5721c776 --- /dev/null +++ b/doc/org/json/class-use/JSONTokener.html @@ -0,0 +1,219 @@ + + + + + +Uses of Class org.json.JSONTokener + + + + + + + + + + + +
+

Uses of Class
org.json.JSONTokener

+
+
+
    +
  • +
      +
    • + + +

      Uses of JSONTokener in org.json

      + + + + + + + + + + + + + + + + +
      Subclasses of JSONTokener in org.json 
      Modifier and TypeClass and Description
      class HTTPTokener +
      The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
      +
      class XMLTokener +
      The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json with parameters of type JSONTokener 
      Modifier and TypeMethod and Description
      private static java.lang.StringCDL.getValue(JSONTokener x) +
      Get the next value.
      +
      static JSONArrayCDL.rowToJSONArray(JSONTokener x) +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      static JSONObjectCDL.rowToJSONObject(JSONArray names, + JSONTokener x) +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      static JSONArrayCDL.toJSONArray(JSONArray names, + JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      static JSONArrayCDL.toJSONArray(JSONTokener x) +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      + + + + + + + + + + + + + +
      Constructors in org.json with parameters of type JSONTokener 
      Constructor and Description
      JSONArray(JSONTokener x) +
      Construct a JSONArray from a JSONTokener.
      +
      JSONObject(JSONTokener x) +
      Construct a JSONObject from a JSONTokener.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/class-use/JSONWriter.html b/doc/org/json/class-use/JSONWriter.html new file mode 100644 index 000000000..c9c40b17d --- /dev/null +++ b/doc/org/json/class-use/JSONWriter.html @@ -0,0 +1,226 @@ + + + + + +Uses of Class org.json.JSONWriter + + + + + + + + + + + +
+

Uses of Class
org.json.JSONWriter

+
+
+ +
+ + + + + + diff --git a/doc/org/json/class-use/Property.html b/doc/org/json/class-use/Property.html new file mode 100644 index 000000000..5395dfdf5 --- /dev/null +++ b/doc/org/json/class-use/Property.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.Property + + + + + + + + + + + +
+

Uses of Class
org.json.Property

+
+
No usage of org.json.Property
+ + + + + + diff --git a/doc/org/json/class-use/XML.html b/doc/org/json/class-use/XML.html new file mode 100644 index 000000000..91632a669 --- /dev/null +++ b/doc/org/json/class-use/XML.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class org.json.XML + + + + + + + + + + + +
+

Uses of Class
org.json.XML

+
+
No usage of org.json.XML
+ + + + + + diff --git a/doc/org/json/class-use/XMLTokener.html b/doc/org/json/class-use/XMLTokener.html new file mode 100644 index 000000000..d729523af --- /dev/null +++ b/doc/org/json/class-use/XMLTokener.html @@ -0,0 +1,173 @@ + + + + + +Uses of Class org.json.XMLTokener + + + + + + + + + + + +
+

Uses of Class
org.json.XMLTokener

+
+
+
    +
  • +
      +
    • + + +

      Uses of XMLTokener in org.json

      + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.json with parameters of type XMLTokener 
      Modifier and TypeMethod and Description
      private static java.lang.ObjectJSONML.parse(XMLTokener x, + boolean arrayForm, + JSONArray ja) +
      Parse XML values and store them in a JSONArray.
      +
      private static booleanXML.parse(XMLTokener x, + JSONObject context, + java.lang.String name) +
      Scan the content following the named tag, attaching it to the context.
      +
      static JSONArrayJSONML.toJSONArray(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
      +
      static JSONObjectJSONML.toJSONObject(XMLTokener x) +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
      +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/package-frame.html b/doc/org/json/package-frame.html new file mode 100644 index 000000000..a08d04969 --- /dev/null +++ b/doc/org/json/package-frame.html @@ -0,0 +1,42 @@ + + + + + +org.json + + + + + +

org.json

+ + + diff --git a/doc/org/json/package-summary.html b/doc/org/json/package-summary.html new file mode 100644 index 000000000..55edf765b --- /dev/null +++ b/doc/org/json/package-summary.html @@ -0,0 +1,272 @@ + + + + + +org.json + + + + + + + + + + + +
+

Package org.json

+
+
+
    +
  • + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    JSONString +
    The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object).
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    CDL +
    This provides static methods to convert comma delimited text into a + JSONArray, and to convert a JSONArray into comma delimited text.
    +
    Cookie +
    Convert a web browser cookie specification to a JSONObject and back.
    +
    CookieList +
    Convert a web browser cookie list string to a JSONObject and back.
    +
    HTTP +
    Convert an HTTP header to a JSONObject and back.
    +
    HTTPTokener +
    The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
    +
    JSONArray +
    A JSONArray is an ordered sequence of values.
    +
    JSONML +
    This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
    +
    JSONObject +
    A JSONObject is an unordered collection of name/value pairs.
    +
    JSONObject.Null +
    JSONObject.NULL is equivalent to the value that JavaScript calls null, + whilst Java's null is equivalent to the value that JavaScript calls + undefined.
    +
    JSONStringer +
    JSONStringer provides a quick and convenient way of producing JSON text.
    +
    JSONTokener +
    A JSONTokener takes a source string and extracts characters and tokens from + it.
    +
    JSONWriter +
    JSONWriter provides a quick and convenient way of producing JSON text.
    +
    Property +
    Converts a Property file data into JSONObject and back.
    +
    XML +
    This provides static methods to convert an XML text into a JSONObject, + and to covert a JSONObject into an XML text.
    +
    XMLTokener +
    The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Exception Summary 
    ExceptionDescription
    JSONException +
    The JSONException is thrown by the JSON.org classes when things are amiss.
    +
    +
  • +
+
+ + + + + + diff --git a/doc/org/json/package-tree.html b/doc/org/json/package-tree.html new file mode 100644 index 000000000..93de16b05 --- /dev/null +++ b/doc/org/json/package-tree.html @@ -0,0 +1,168 @@ + + + + + +org.json Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package org.json

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/doc/org/json/package-use.html b/doc/org/json/package-use.html new file mode 100644 index 000000000..57e97a659 --- /dev/null +++ b/doc/org/json/package-use.html @@ -0,0 +1,169 @@ + + + + + +Uses of Package org.json + + + + + + + + + + + +
+

Uses of Package
org.json

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Classes in org.json used by org.json 
    Class and Description
    JSONArray +
    A JSONArray is an ordered sequence of values.
    +
    JSONException +
    The JSONException is thrown by the JSON.org classes when things are amiss.
    +
    JSONObject +
    A JSONObject is an unordered collection of name/value pairs.
    +
    JSONTokener +
    A JSONTokener takes a source string and extracts characters and tokens from + it.
    +
    JSONWriter +
    JSONWriter provides a quick and convenient way of producing JSON text.
    +
    XMLTokener +
    The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
    +
    +
  • +
+
+ + + + + + diff --git a/doc/overview-tree.html b/doc/overview-tree.html new file mode 100644 index 000000000..a46355b68 --- /dev/null +++ b/doc/overview-tree.html @@ -0,0 +1,172 @@ + + + + + +Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/doc/package-list b/doc/package-list new file mode 100644 index 000000000..ccf841806 --- /dev/null +++ b/doc/package-list @@ -0,0 +1 @@ +org.json diff --git a/doc/script.js b/doc/script.js new file mode 100644 index 000000000..c3a1cae44 --- /dev/null +++ b/doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/doc/serialized-form.html b/doc/serialized-form.html new file mode 100644 index 000000000..35223c8cf --- /dev/null +++ b/doc/serialized-form.html @@ -0,0 +1,150 @@ + + + + + +Serialized Form + + + + + + + + + + + +
+

Serialized Form

+
+
+
    +
  • +

    Package org.json

    +
      +
    • + + +

      Class org.json.JSONException extends java.lang.RuntimeException implements Serializable

      +
      +
      serialVersionUID:
      +
      0L
      +
      +
        +
      • +

        Serialized Fields

        +
          +
        • +

          cause

          +
          java.lang.Throwable cause
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/stylesheet.css b/doc/stylesheet.css new file mode 100644 index 000000000..1e392db48 --- /dev/null +++ b/doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; + width:100%; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +}