jx2.baseline 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509
  1. J*************************** JSON test parse simple literals ***************
  2. {"memberNum":-0.1}
  3. J*************************** JSON test parse simple with no reviver ***************
  4. JSON Parse__ original=
  5. {"" : 7, "memberNullFirst" : null, "memberNum" : 3, "memberNegNum" : -98765,"memberStr" : "StringJSON", "memberBool" : true , "memberObj" : { "mm" : 1, "mb" : false}, "memberX" : {}, "memberArray" : [33, "StringTst",null,{}], "memberNull" : null}
  6. __Parsed and stringify back=
  7. {"":7,"memberNullFirst":null,"memberNum":3,"memberNegNum":-98765,"memberStr":"StringJSON","memberBool":true,"memberObj":{"mm":1,"mb":false},"memberX":{},"memberArray":[33,"StringTst",null,{}],"memberNull":null}
  8. J*************************** JSON test parse simple with tracing reviver ***************
  9. JSON Parse__ original=
  10. {"" : 7, "memberNullFirst" : null, "memberNum" : 3, "memberNegNum" : -98765,"memberStr" : "StringJSON", "memberBool" : true , "memberObj" : { "mm" : 1, "mb" : false}, "memberX" : {}, "memberArray" : [33, "StringTst",null,{}], "memberNull" : null}
  11. +++in reviver
  12. 7
  13. +++out reviver
  14. +++in reviver
  15. memberNullFirst
  16. null
  17. +++out reviver
  18. +++in reviver
  19. memberNum
  20. 3
  21. +++out reviver
  22. +++in reviver
  23. memberNegNum
  24. -98765
  25. +++out reviver
  26. +++in reviver
  27. memberStr
  28. StringJSON
  29. +++out reviver
  30. +++in reviver
  31. memberBool
  32. true
  33. +++out reviver
  34. +++in reviver
  35. mm
  36. 1
  37. +++out reviver
  38. +++in reviver
  39. mb
  40. false
  41. +++out reviver
  42. +++in reviver
  43. memberObj
  44. [object Object]
  45. +++out reviver
  46. +++in reviver
  47. memberX
  48. [object Object]
  49. +++out reviver
  50. +++in reviver
  51. 0
  52. 33
  53. +++out reviver
  54. +++in reviver
  55. 1
  56. StringTst
  57. +++out reviver
  58. +++in reviver
  59. 2
  60. null
  61. +++out reviver
  62. +++in reviver
  63. 3
  64. [object Object]
  65. +++out reviver
  66. +++in reviver
  67. memberArray
  68. 33,StringTst,,[object Object]
  69. +++out reviver
  70. +++in reviver
  71. memberNull
  72. null
  73. +++out reviver
  74. +++in reviver
  75. [object Object]
  76. +++out reviver
  77. __Parsed with tracing reviver and stringify back =
  78. {"":7,"memberNullFirst":null,"memberNegNum":-98765,"memberStr":"StringJSON","memberBool":99,"memberObj":{"mm":99,"mb":false},"memberX":{},"memberArray":[33,"StringTst",null,{}],"memberNull":null}
  79. J*************************** JSON test parse simple with data restore reviver ***************
  80. JSON Parse__ original=
  81. {"" : 7, "memberNullFirst" : null, "dateMember" : "2008-05-30T07:00:59Z", "memberNum" : 3, "memberStr" : "StringJSON", "memberBool" : true , "memberObj" : { "mm" : 1, "mb" : false}, "memberX" : {}, "memberArray" : [33, "StringTst",null,{}], "memberNull" : null}
  82. __Parsed and stringify back with Date rev =
  83. {"":7,"memberNullFirst":null,"dateMember":"2008-05-30T07:00:59.000Z","memberNum":3,"memberStr":"StringJSON","memberBool":true,"memberObj":{"mm":1,"mb":false},"memberX":{},"memberArray":[33,"StringTst",null,{}],"memberNull":null}
  84. VERIFICATION: restored date year(if this doesn't throw we know the filter worked)=
  85. 2008
  86. J*************************** JSON test parse simple with reviver2: replace(delete) 3.14 by undefined, replace'true' by 99 ***************
  87. JSON Parse__ original=
  88. {"" : 7, "memberNullFirst" : null, "dateMember" : "2008-05-30T07:00:59Z", "memberNum" : 3, "memberStr" : "StringJSON", "memberBool" : true , "memberObj" : { "mm" : 1, "mb" : false}, "memberX" : {}, "memberArray" : [33, "StringTst",null,{}], "memberNull" : null}
  89. __Parsed with reviver2 and stringify back=
  90. {"":7,"memberNullFirst":null,"dateMember":"2008-05-30T07:00:59Z","memberNum":3,"memberStr":"StringJSON","memberBool":99,"memberObj":{"mm":99,"mb":false},"memberX":{},"memberArray":[33,"StringTst",null,{}],"memberNull":null}
  91. %%%%%%%%%%%%%%%%% Matrix Testing %%%%%%%%%%%%%%%%%
  92. J*************************** JSON test stringify - simple, no space, not replacer ***********************
  93. ------ JSON test stringify: String simple ------
  94. "SampleTest"
  95. === Parsed and restringified :
  96. "SampleTest"
  97. === Parsed with reviver and restringified :
  98. "SampleTest"
  99. ------ JSON test stringify: Number(1) ------
  100. 1
  101. === Parsed and restringified :
  102. 1
  103. === Parsed with reviver and restringified :
  104. 99
  105. ------ JSON test stringify: Number(1234) ------
  106. 12345
  107. === Parsed and restringified :
  108. 12345
  109. === Parsed with reviver and restringified :
  110. 12345
  111. ------ JSON test stringify: Number(3.14) ------
  112. 3.14
  113. === Parsed and restringified :
  114. 3.14
  115. === Parsed with reviver and restringified :
  116. undefined
  117. ------ JSON test stringify: Number(NaN) ------
  118. null
  119. === Parsed and restringified :
  120. null
  121. === Parsed with reviver and restringified :
  122. null
  123. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  124. null
  125. === Parsed and restringified :
  126. null
  127. === Parsed with reviver and restringified :
  128. null
  129. ------ JSON test stringify: bool(true) ------
  130. true
  131. === Parsed and restringified :
  132. true
  133. === Parsed with reviver and restringified :
  134. 99
  135. ------ JSON test stringify: bool(false) ------
  136. false
  137. === Parsed and restringified :
  138. false
  139. === Parsed with reviver and restringified :
  140. false
  141. ------ JSON test stringify: null ------
  142. null
  143. === Parsed and restringified :
  144. null
  145. === Parsed with reviver and restringified :
  146. null
  147. ------ JSON test stringify: undefined ------
  148. undefined
  149. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  150. ------ JSON test stringify: Date(2008, 10, 10) ------
  151. "2008-11-10T08:00:00.000Z"
  152. === Parsed and restringified :
  153. "2008-11-10T08:00:00.000Z"
  154. === Parsed with reviver and restringified :
  155. "2008-11-10T08:00:00.000Z"
  156. ------ JSON test stringify: string in Object ------
  157. "hello"
  158. === Parsed and restringified :
  159. "hello"
  160. === Parsed with reviver and restringified :
  161. "hello"
  162. ------ JSON test stringify: number in Object ------
  163. 33
  164. === Parsed and restringified :
  165. 33
  166. === Parsed with reviver and restringified :
  167. 33
  168. ------ JSON test stringify: bool in Object ------
  169. true
  170. === Parsed and restringified :
  171. true
  172. === Parsed with reviver and restringified :
  173. 99
  174. ------ JSON test stringify: SimpleObject ------
  175. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  176. === Parsed and restringified :
  177. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  178. === Parsed with reviver and restringified :
  179. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  180. ------ JSON test stringify: Object with nested objects and array ------
  181. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  182. === Parsed and restringified :
  183. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  184. === Parsed with reviver and restringified :
  185. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":99,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":99,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  186. ------ JSON test stringify: Simple array ------
  187. ["document.location","foolish"]
  188. === Parsed and restringified :
  189. ["document.location","foolish"]
  190. === Parsed with reviver and restringified :
  191. ["document.location","foolish"]
  192. ------ JSON test stringify: Complex array ------
  193. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  194. === Parsed and restringified :
  195. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  196. === Parsed with reviver and restringified :
  197. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  198. ------ JSON test stringify: complex string ------
  199. PASS
  200. === Parsed and restringified :
  201. PASS
  202. === Parsed with reviver and restringified :
  203. PASS
  204. *************************** JSON test stringify: replacer: null space: null ***********************
  205. ------ JSON test stringify: String simple ------
  206. "SampleTest"
  207. === Parsed with no reviver and restringified :
  208. "SampleTest"
  209. === Parsed with reviver2 and restringified :
  210. "SampleTest"
  211. ------ JSON test stringify: Number(1) ------
  212. 1
  213. === Parsed with no reviver and restringified :
  214. 1
  215. === Parsed with reviver2 and restringified :
  216. 99
  217. ------ JSON test stringify: Number(1234) ------
  218. 12345
  219. === Parsed with no reviver and restringified :
  220. 12345
  221. === Parsed with reviver2 and restringified :
  222. 12345
  223. ------ JSON test stringify: Number(3.14) ------
  224. 3.14
  225. === Parsed with no reviver and restringified :
  226. 3.14
  227. === Parsed with reviver2 and restringified :
  228. undefined
  229. ------ JSON test stringify: Number(NaN) ------
  230. null
  231. === Parsed with no reviver and restringified :
  232. null
  233. === Parsed with reviver2 and restringified :
  234. null
  235. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  236. null
  237. === Parsed with no reviver and restringified :
  238. null
  239. === Parsed with reviver2 and restringified :
  240. null
  241. ------ JSON test stringify: bool(true) ------
  242. true
  243. === Parsed with no reviver and restringified :
  244. true
  245. === Parsed with reviver2 and restringified :
  246. 99
  247. ------ JSON test stringify: bool(false) ------
  248. false
  249. === Parsed with no reviver and restringified :
  250. false
  251. === Parsed with reviver2 and restringified :
  252. false
  253. ------ JSON test stringify: null ------
  254. null
  255. === Parsed with no reviver and restringified :
  256. null
  257. === Parsed with reviver2 and restringified :
  258. null
  259. ------ JSON test stringify: undefined ------
  260. undefined
  261. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  262. ------ JSON test stringify: Date(2008, 10, 10) ------
  263. "2008-11-10T08:00:00.000Z"
  264. === Parsed with no reviver and restringified :
  265. "2008-11-10T08:00:00.000Z"
  266. === Parsed with reviver2 and restringified :
  267. "2008-11-10T08:00:00.000Z"
  268. ------ JSON test stringify: string in Object ------
  269. "hello"
  270. === Parsed with no reviver and restringified :
  271. "hello"
  272. === Parsed with reviver2 and restringified :
  273. "hello"
  274. ------ JSON test stringify: number in Object ------
  275. 33
  276. === Parsed with no reviver and restringified :
  277. 33
  278. === Parsed with reviver2 and restringified :
  279. 33
  280. ------ JSON test stringify: bool in Object ------
  281. true
  282. === Parsed with no reviver and restringified :
  283. true
  284. === Parsed with reviver2 and restringified :
  285. 99
  286. ------ JSON test stringify: SimpleObject ------
  287. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  288. === Parsed with no reviver and restringified :
  289. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  290. === Parsed with reviver2 and restringified :
  291. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  292. ------ JSON test stringify: Object with nested objects and array ------
  293. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  294. === Parsed with no reviver and restringified :
  295. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  296. === Parsed with reviver2 and restringified :
  297. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":99,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":99,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  298. ------ JSON test stringify: Simple array ------
  299. ["document.location","foolish"]
  300. === Parsed with no reviver and restringified :
  301. ["document.location","foolish"]
  302. === Parsed with reviver2 and restringified :
  303. ["document.location","foolish"]
  304. ------ JSON test stringify: Complex array ------
  305. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  306. === Parsed with no reviver and restringified :
  307. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  308. === Parsed with reviver2 and restringified :
  309. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  310. ------ JSON test stringify: complex string 2 ------
  311. PASS
  312. === Parsed with no reviver and restringified :
  313. PASS
  314. === Parsed with reviver2 and restringified :
  315. PASS
  316. *************************** JSON test stringify: replacer: null space: number 4 ***********************
  317. ------ JSON test stringify: String simple ------
  318. "SampleTest"
  319. === Parsed with no reviver and restringified :
  320. "SampleTest"
  321. === Parsed with reviver2 and restringified :
  322. "SampleTest"
  323. ------ JSON test stringify: Number(1) ------
  324. 1
  325. === Parsed with no reviver and restringified :
  326. 1
  327. === Parsed with reviver2 and restringified :
  328. 99
  329. ------ JSON test stringify: Number(1234) ------
  330. 12345
  331. === Parsed with no reviver and restringified :
  332. 12345
  333. === Parsed with reviver2 and restringified :
  334. 12345
  335. ------ JSON test stringify: Number(3.14) ------
  336. 3.14
  337. === Parsed with no reviver and restringified :
  338. 3.14
  339. === Parsed with reviver2 and restringified :
  340. undefined
  341. ------ JSON test stringify: Number(NaN) ------
  342. null
  343. === Parsed with no reviver and restringified :
  344. null
  345. === Parsed with reviver2 and restringified :
  346. null
  347. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  348. null
  349. === Parsed with no reviver and restringified :
  350. null
  351. === Parsed with reviver2 and restringified :
  352. null
  353. ------ JSON test stringify: bool(true) ------
  354. true
  355. === Parsed with no reviver and restringified :
  356. true
  357. === Parsed with reviver2 and restringified :
  358. 99
  359. ------ JSON test stringify: bool(false) ------
  360. false
  361. === Parsed with no reviver and restringified :
  362. false
  363. === Parsed with reviver2 and restringified :
  364. false
  365. ------ JSON test stringify: null ------
  366. null
  367. === Parsed with no reviver and restringified :
  368. null
  369. === Parsed with reviver2 and restringified :
  370. null
  371. ------ JSON test stringify: undefined ------
  372. undefined
  373. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  374. ------ JSON test stringify: Date(2008, 10, 10) ------
  375. "2008-11-10T08:00:00.000Z"
  376. === Parsed with no reviver and restringified :
  377. "2008-11-10T08:00:00.000Z"
  378. === Parsed with reviver2 and restringified :
  379. "2008-11-10T08:00:00.000Z"
  380. ------ JSON test stringify: string in Object ------
  381. "hello"
  382. === Parsed with no reviver and restringified :
  383. "hello"
  384. === Parsed with reviver2 and restringified :
  385. "hello"
  386. ------ JSON test stringify: number in Object ------
  387. 33
  388. === Parsed with no reviver and restringified :
  389. 33
  390. === Parsed with reviver2 and restringified :
  391. 33
  392. ------ JSON test stringify: bool in Object ------
  393. true
  394. === Parsed with no reviver and restringified :
  395. true
  396. === Parsed with reviver2 and restringified :
  397. 99
  398. ------ JSON test stringify: SimpleObject ------
  399. {
  400. "MemberNo1": "\"data\"",
  401. "dateMember": "2008-04-01T07:00:00.000Z",
  402. "nullMember": null,
  403. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  404. }
  405. === Parsed with no reviver and restringified :
  406. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  407. === Parsed with reviver2 and restringified :
  408. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  409. ------ JSON test stringify: Object with nested objects and array ------
  410. {
  411. "MemberNo1": "\"data\"",
  412. "dateMember": "2008-04-01T07:00:00.000Z",
  413. "nullMember": null,
  414. "arr": [
  415. "document.location",
  416. "foolish"
  417. ],
  418. "nested": {
  419. "nestedM1": {},
  420. "nestedM2": 1234,
  421. "nestedM3": {
  422. "a": true,
  423. "b": false
  424. }
  425. },
  426. "a": {
  427. "a": {},
  428. "nestedM2": 1234,
  429. "b": {
  430. "a": true,
  431. "b": false,
  432. "c": 3.14
  433. }
  434. },
  435. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  436. }
  437. === Parsed with no reviver and restringified :
  438. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  439. === Parsed with reviver2 and restringified :
  440. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":99,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":99,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  441. ------ JSON test stringify: Simple array ------
  442. [
  443. "document.location",
  444. "foolish"
  445. ]
  446. === Parsed with no reviver and restringified :
  447. ["document.location","foolish"]
  448. === Parsed with reviver2 and restringified :
  449. ["document.location","foolish"]
  450. ------ JSON test stringify: Complex array ------
  451. [
  452. "document.location",
  453. "foolish",
  454. 12.3,
  455. "2008-10-09T07:00:00.000Z",
  456. {},
  457. null,
  458. {
  459. "intMember": 3,
  460. "strMember": "string_member_in_object"
  461. },
  462. null,
  463. null,
  464. null,
  465. [
  466. "NestedArray_1stParamString",
  467. 3.14,
  468. {
  469. "a": "nested object in array",
  470. "c": true
  471. },
  472. null,
  473. []
  474. ],
  475. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  476. ]
  477. === Parsed with no reviver and restringified :
  478. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  479. === Parsed with reviver2 and restringified :
  480. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  481. ------ JSON test stringify: complex string 2 ------
  482. PASS
  483. === Parsed with no reviver and restringified :
  484. PASS
  485. === Parsed with reviver2 and restringified :
  486. PASS
  487. *************************** JSON test stringify: replacer: null space: number 24 ***********************
  488. ------ JSON test stringify: String simple ------
  489. "SampleTest"
  490. === Parsed with no reviver and restringified :
  491. "SampleTest"
  492. === Parsed with reviver2 and restringified :
  493. "SampleTest"
  494. ------ JSON test stringify: Number(1) ------
  495. 1
  496. === Parsed with no reviver and restringified :
  497. 1
  498. === Parsed with reviver2 and restringified :
  499. 99
  500. ------ JSON test stringify: Number(1234) ------
  501. 12345
  502. === Parsed with no reviver and restringified :
  503. 12345
  504. === Parsed with reviver2 and restringified :
  505. 12345
  506. ------ JSON test stringify: Number(3.14) ------
  507. 3.14
  508. === Parsed with no reviver and restringified :
  509. 3.14
  510. === Parsed with reviver2 and restringified :
  511. undefined
  512. ------ JSON test stringify: Number(NaN) ------
  513. null
  514. === Parsed with no reviver and restringified :
  515. null
  516. === Parsed with reviver2 and restringified :
  517. null
  518. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  519. null
  520. === Parsed with no reviver and restringified :
  521. null
  522. === Parsed with reviver2 and restringified :
  523. null
  524. ------ JSON test stringify: bool(true) ------
  525. true
  526. === Parsed with no reviver and restringified :
  527. true
  528. === Parsed with reviver2 and restringified :
  529. 99
  530. ------ JSON test stringify: bool(false) ------
  531. false
  532. === Parsed with no reviver and restringified :
  533. false
  534. === Parsed with reviver2 and restringified :
  535. false
  536. ------ JSON test stringify: null ------
  537. null
  538. === Parsed with no reviver and restringified :
  539. null
  540. === Parsed with reviver2 and restringified :
  541. null
  542. ------ JSON test stringify: undefined ------
  543. undefined
  544. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  545. ------ JSON test stringify: Date(2008, 10, 10) ------
  546. "2008-11-10T08:00:00.000Z"
  547. === Parsed with no reviver and restringified :
  548. "2008-11-10T08:00:00.000Z"
  549. === Parsed with reviver2 and restringified :
  550. "2008-11-10T08:00:00.000Z"
  551. ------ JSON test stringify: string in Object ------
  552. "hello"
  553. === Parsed with no reviver and restringified :
  554. "hello"
  555. === Parsed with reviver2 and restringified :
  556. "hello"
  557. ------ JSON test stringify: number in Object ------
  558. 33
  559. === Parsed with no reviver and restringified :
  560. 33
  561. === Parsed with reviver2 and restringified :
  562. 33
  563. ------ JSON test stringify: bool in Object ------
  564. true
  565. === Parsed with no reviver and restringified :
  566. true
  567. === Parsed with reviver2 and restringified :
  568. 99
  569. ------ JSON test stringify: SimpleObject ------
  570. {
  571. "MemberNo1": "\"data\"",
  572. "dateMember": "2008-04-01T07:00:00.000Z",
  573. "nullMember": null,
  574. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  575. }
  576. === Parsed with no reviver and restringified :
  577. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  578. === Parsed with reviver2 and restringified :
  579. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  580. ------ JSON test stringify: Object with nested objects and array ------
  581. {
  582. "MemberNo1": "\"data\"",
  583. "dateMember": "2008-04-01T07:00:00.000Z",
  584. "nullMember": null,
  585. "arr": [
  586. "document.location",
  587. "foolish"
  588. ],
  589. "nested": {
  590. "nestedM1": {},
  591. "nestedM2": 1234,
  592. "nestedM3": {
  593. "a": true,
  594. "b": false
  595. }
  596. },
  597. "a": {
  598. "a": {},
  599. "nestedM2": 1234,
  600. "b": {
  601. "a": true,
  602. "b": false,
  603. "c": 3.14
  604. }
  605. },
  606. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  607. }
  608. === Parsed with no reviver and restringified :
  609. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":true,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":true,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  610. === Parsed with reviver2 and restringified :
  611. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":99,"b":false}},"a":{"a":{},"nestedM2":1234,"b":{"a":99,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  612. ------ JSON test stringify: Simple array ------
  613. [
  614. "document.location",
  615. "foolish"
  616. ]
  617. === Parsed with no reviver and restringified :
  618. ["document.location","foolish"]
  619. === Parsed with reviver2 and restringified :
  620. ["document.location","foolish"]
  621. ------ JSON test stringify: Complex array ------
  622. [
  623. "document.location",
  624. "foolish",
  625. 12.3,
  626. "2008-10-09T07:00:00.000Z",
  627. {},
  628. null,
  629. {
  630. "intMember": 3,
  631. "strMember": "string_member_in_object"
  632. },
  633. null,
  634. null,
  635. null,
  636. [
  637. "NestedArray_1stParamString",
  638. 3.14,
  639. {
  640. "a": "nested object in array",
  641. "c": true
  642. },
  643. null,
  644. []
  645. ],
  646. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  647. ]
  648. === Parsed with no reviver and restringified :
  649. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  650. === Parsed with reviver2 and restringified :
  651. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  652. ------ JSON test stringify: complex string 2 ------
  653. PASS
  654. === Parsed with no reviver and restringified :
  655. PASS
  656. === Parsed with reviver2 and restringified :
  657. PASS
  658. *************************** JSON test stringify: replacer: null space: string : ........................ ***********************
  659. ------ JSON test stringify: String simple ------
  660. "SampleTest"
  661. === Parsed with no reviver and restringified :
  662. "SampleTest"
  663. === Parsed with reviver2 and restringified :
  664. "SampleTest"
  665. ------ JSON test stringify: Number(1) ------
  666. 1
  667. === Parsed with no reviver and restringified :
  668. 1
  669. === Parsed with reviver2 and restringified :
  670. 99
  671. ------ JSON test stringify: Number(1234) ------
  672. 12345
  673. === Parsed with no reviver and restringified :
  674. 12345
  675. === Parsed with reviver2 and restringified :
  676. 12345
  677. ------ JSON test stringify: Number(3.14) ------
  678. 3.14
  679. === Parsed with no reviver and restringified :
  680. 3.14
  681. === Parsed with reviver2 and restringified :
  682. undefined
  683. ------ JSON test stringify: Number(NaN) ------
  684. null
  685. === Parsed with no reviver and restringified :
  686. null
  687. === Parsed with reviver2 and restringified :
  688. null
  689. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  690. null
  691. === Parsed with no reviver and restringified :
  692. null
  693. === Parsed with reviver2 and restringified :
  694. null
  695. ------ JSON test stringify: bool(true) ------
  696. true
  697. === Parsed with no reviver and restringified :
  698. true
  699. === Parsed with reviver2 and restringified :
  700. 99
  701. ------ JSON test stringify: bool(false) ------
  702. false
  703. === Parsed with no reviver and restringified :
  704. false
  705. === Parsed with reviver2 and restringified :
  706. false
  707. ------ JSON test stringify: null ------
  708. null
  709. === Parsed with no reviver and restringified :
  710. null
  711. === Parsed with reviver2 and restringified :
  712. null
  713. ------ JSON test stringify: undefined ------
  714. undefined
  715. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  716. ------ JSON test stringify: Date(2008, 10, 10) ------
  717. "2008-11-10T08:00:00.000Z"
  718. === Parsed with no reviver and restringified :
  719. "2008-11-10T08:00:00.000Z"
  720. === Parsed with reviver2 and restringified :
  721. "2008-11-10T08:00:00.000Z"
  722. ------ JSON test stringify: string in Object ------
  723. "hello"
  724. === Parsed with no reviver and restringified :
  725. "hello"
  726. === Parsed with reviver2 and restringified :
  727. "hello"
  728. ------ JSON test stringify: number in Object ------
  729. 33
  730. === Parsed with no reviver and restringified :
  731. 33
  732. === Parsed with reviver2 and restringified :
  733. 33
  734. ------ JSON test stringify: bool in Object ------
  735. true
  736. === Parsed with no reviver and restringified :
  737. true
  738. === Parsed with reviver2 and restringified :
  739. 99
  740. ------ JSON test stringify: SimpleObject ------
  741. {
  742. .........."MemberNo1": "\"data\"",
  743. .........."dateMember": "2008-04-01T07:00:00.000Z",
  744. .........."nullMember": null,
  745. .........."stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  746. }
  747. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  748. ------ JSON test stringify: Object with nested objects and array ------
  749. {
  750. .........."MemberNo1": "\"data\"",
  751. .........."dateMember": "2008-04-01T07:00:00.000Z",
  752. .........."nullMember": null,
  753. .........."arr": [
  754. ...................."document.location",
  755. ...................."foolish"
  756. ..........],
  757. .........."nested": {
  758. ...................."nestedM1": {},
  759. ...................."nestedM2": 1234,
  760. ...................."nestedM3": {
  761. .............................."a": true,
  762. .............................."b": false
  763. ....................}
  764. ..........},
  765. .........."a": {
  766. ...................."a": {},
  767. ...................."nestedM2": 1234,
  768. ...................."b": {
  769. .............................."a": true,
  770. .............................."b": false,
  771. .............................."c": 3.14
  772. ....................}
  773. ..........},
  774. .........."stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  775. }
  776. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  777. ------ JSON test stringify: Simple array ------
  778. [
  779. .........."document.location",
  780. .........."foolish"
  781. ]
  782. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  783. ------ JSON test stringify: Complex array ------
  784. [
  785. .........."document.location",
  786. .........."foolish",
  787. ..........12.3,
  788. .........."2008-10-09T07:00:00.000Z",
  789. ..........{},
  790. ..........null,
  791. ..........{
  792. ...................."intMember": 3,
  793. ...................."strMember": "string_member_in_object"
  794. ..........},
  795. ..........null,
  796. ..........null,
  797. ..........null,
  798. ..........[
  799. ...................."NestedArray_1stParamString",
  800. ....................3.14,
  801. ....................{
  802. .............................."a": "nested object in array",
  803. .............................."c": true
  804. ....................},
  805. ....................null,
  806. ....................[]
  807. ..........],
  808. .........."[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  809. ]
  810. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  811. ------ JSON test stringify: complex string 2 ------
  812. PASS
  813. === Parsed with no reviver and restringified :
  814. PASS
  815. === Parsed with reviver2 and restringified :
  816. PASS
  817. *************************** JSON test stringify: replacer: array replacer: [] space: null ***********************
  818. ------ JSON test stringify: String simple ------
  819. "SampleTest"
  820. === Parsed with no reviver and restringified :
  821. "SampleTest"
  822. === Parsed with reviver2 and restringified :
  823. "SampleTest"
  824. ------ JSON test stringify: Number(1) ------
  825. 1
  826. === Parsed with no reviver and restringified :
  827. 1
  828. === Parsed with reviver2 and restringified :
  829. 99
  830. ------ JSON test stringify: Number(1234) ------
  831. 12345
  832. === Parsed with no reviver and restringified :
  833. 12345
  834. === Parsed with reviver2 and restringified :
  835. 12345
  836. ------ JSON test stringify: Number(3.14) ------
  837. 3.14
  838. === Parsed with no reviver and restringified :
  839. 3.14
  840. === Parsed with reviver2 and restringified :
  841. undefined
  842. ------ JSON test stringify: Number(NaN) ------
  843. null
  844. === Parsed with no reviver and restringified :
  845. null
  846. === Parsed with reviver2 and restringified :
  847. null
  848. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  849. null
  850. === Parsed with no reviver and restringified :
  851. null
  852. === Parsed with reviver2 and restringified :
  853. null
  854. ------ JSON test stringify: bool(true) ------
  855. true
  856. === Parsed with no reviver and restringified :
  857. true
  858. === Parsed with reviver2 and restringified :
  859. 99
  860. ------ JSON test stringify: bool(false) ------
  861. false
  862. === Parsed with no reviver and restringified :
  863. false
  864. === Parsed with reviver2 and restringified :
  865. false
  866. ------ JSON test stringify: null ------
  867. null
  868. === Parsed with no reviver and restringified :
  869. null
  870. === Parsed with reviver2 and restringified :
  871. null
  872. ------ JSON test stringify: undefined ------
  873. undefined
  874. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  875. ------ JSON test stringify: Date(2008, 10, 10) ------
  876. "2008-11-10T08:00:00.000Z"
  877. === Parsed with no reviver and restringified :
  878. "2008-11-10T08:00:00.000Z"
  879. === Parsed with reviver2 and restringified :
  880. "2008-11-10T08:00:00.000Z"
  881. ------ JSON test stringify: string in Object ------
  882. "hello"
  883. === Parsed with no reviver and restringified :
  884. "hello"
  885. === Parsed with reviver2 and restringified :
  886. "hello"
  887. ------ JSON test stringify: number in Object ------
  888. 33
  889. === Parsed with no reviver and restringified :
  890. 33
  891. === Parsed with reviver2 and restringified :
  892. 33
  893. ------ JSON test stringify: bool in Object ------
  894. true
  895. === Parsed with no reviver and restringified :
  896. true
  897. === Parsed with reviver2 and restringified :
  898. 99
  899. ------ JSON test stringify: SimpleObject ------
  900. {}
  901. === Parsed with no reviver and restringified :
  902. {}
  903. === Parsed with reviver2 and restringified :
  904. {}
  905. ------ JSON test stringify: Object with nested objects and array ------
  906. {}
  907. === Parsed with no reviver and restringified :
  908. {}
  909. === Parsed with reviver2 and restringified :
  910. {}
  911. ------ JSON test stringify: Simple array ------
  912. ["document.location","foolish"]
  913. === Parsed with no reviver and restringified :
  914. ["document.location","foolish"]
  915. === Parsed with reviver2 and restringified :
  916. ["document.location","foolish"]
  917. ------ JSON test stringify: Complex array ------
  918. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  919. === Parsed with no reviver and restringified :
  920. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  921. === Parsed with reviver2 and restringified :
  922. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  923. ------ JSON test stringify: complex string 2 ------
  924. PASS
  925. === Parsed with no reviver and restringified :
  926. PASS
  927. === Parsed with reviver2 and restringified :
  928. PASS
  929. *************************** JSON test stringify: replacer: array replacer: [] space: number 4 ***********************
  930. ------ JSON test stringify: String simple ------
  931. "SampleTest"
  932. === Parsed with no reviver and restringified :
  933. "SampleTest"
  934. === Parsed with reviver2 and restringified :
  935. "SampleTest"
  936. ------ JSON test stringify: Number(1) ------
  937. 1
  938. === Parsed with no reviver and restringified :
  939. 1
  940. === Parsed with reviver2 and restringified :
  941. 99
  942. ------ JSON test stringify: Number(1234) ------
  943. 12345
  944. === Parsed with no reviver and restringified :
  945. 12345
  946. === Parsed with reviver2 and restringified :
  947. 12345
  948. ------ JSON test stringify: Number(3.14) ------
  949. 3.14
  950. === Parsed with no reviver and restringified :
  951. 3.14
  952. === Parsed with reviver2 and restringified :
  953. undefined
  954. ------ JSON test stringify: Number(NaN) ------
  955. null
  956. === Parsed with no reviver and restringified :
  957. null
  958. === Parsed with reviver2 and restringified :
  959. null
  960. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  961. null
  962. === Parsed with no reviver and restringified :
  963. null
  964. === Parsed with reviver2 and restringified :
  965. null
  966. ------ JSON test stringify: bool(true) ------
  967. true
  968. === Parsed with no reviver and restringified :
  969. true
  970. === Parsed with reviver2 and restringified :
  971. 99
  972. ------ JSON test stringify: bool(false) ------
  973. false
  974. === Parsed with no reviver and restringified :
  975. false
  976. === Parsed with reviver2 and restringified :
  977. false
  978. ------ JSON test stringify: null ------
  979. null
  980. === Parsed with no reviver and restringified :
  981. null
  982. === Parsed with reviver2 and restringified :
  983. null
  984. ------ JSON test stringify: undefined ------
  985. undefined
  986. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  987. ------ JSON test stringify: Date(2008, 10, 10) ------
  988. "2008-11-10T08:00:00.000Z"
  989. === Parsed with no reviver and restringified :
  990. "2008-11-10T08:00:00.000Z"
  991. === Parsed with reviver2 and restringified :
  992. "2008-11-10T08:00:00.000Z"
  993. ------ JSON test stringify: string in Object ------
  994. "hello"
  995. === Parsed with no reviver and restringified :
  996. "hello"
  997. === Parsed with reviver2 and restringified :
  998. "hello"
  999. ------ JSON test stringify: number in Object ------
  1000. 33
  1001. === Parsed with no reviver and restringified :
  1002. 33
  1003. === Parsed with reviver2 and restringified :
  1004. 33
  1005. ------ JSON test stringify: bool in Object ------
  1006. true
  1007. === Parsed with no reviver and restringified :
  1008. true
  1009. === Parsed with reviver2 and restringified :
  1010. 99
  1011. ------ JSON test stringify: SimpleObject ------
  1012. {}
  1013. === Parsed with no reviver and restringified :
  1014. {}
  1015. === Parsed with reviver2 and restringified :
  1016. {}
  1017. ------ JSON test stringify: Object with nested objects and array ------
  1018. {}
  1019. === Parsed with no reviver and restringified :
  1020. {}
  1021. === Parsed with reviver2 and restringified :
  1022. {}
  1023. ------ JSON test stringify: Simple array ------
  1024. [
  1025. "document.location",
  1026. "foolish"
  1027. ]
  1028. === Parsed with no reviver and restringified :
  1029. ["document.location","foolish"]
  1030. === Parsed with reviver2 and restringified :
  1031. ["document.location","foolish"]
  1032. ------ JSON test stringify: Complex array ------
  1033. [
  1034. "document.location",
  1035. "foolish",
  1036. 12.3,
  1037. "2008-10-09T07:00:00.000Z",
  1038. {},
  1039. null,
  1040. {},
  1041. null,
  1042. null,
  1043. null,
  1044. [
  1045. "NestedArray_1stParamString",
  1046. 3.14,
  1047. {},
  1048. null,
  1049. []
  1050. ],
  1051. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1052. ]
  1053. === Parsed with no reviver and restringified :
  1054. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1055. === Parsed with reviver2 and restringified :
  1056. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1057. ------ JSON test stringify: complex string 2 ------
  1058. PASS
  1059. === Parsed with no reviver and restringified :
  1060. PASS
  1061. === Parsed with reviver2 and restringified :
  1062. PASS
  1063. *************************** JSON test stringify: replacer: array replacer: [] space: number 24 ***********************
  1064. ------ JSON test stringify: String simple ------
  1065. "SampleTest"
  1066. === Parsed with no reviver and restringified :
  1067. "SampleTest"
  1068. === Parsed with reviver2 and restringified :
  1069. "SampleTest"
  1070. ------ JSON test stringify: Number(1) ------
  1071. 1
  1072. === Parsed with no reviver and restringified :
  1073. 1
  1074. === Parsed with reviver2 and restringified :
  1075. 99
  1076. ------ JSON test stringify: Number(1234) ------
  1077. 12345
  1078. === Parsed with no reviver and restringified :
  1079. 12345
  1080. === Parsed with reviver2 and restringified :
  1081. 12345
  1082. ------ JSON test stringify: Number(3.14) ------
  1083. 3.14
  1084. === Parsed with no reviver and restringified :
  1085. 3.14
  1086. === Parsed with reviver2 and restringified :
  1087. undefined
  1088. ------ JSON test stringify: Number(NaN) ------
  1089. null
  1090. === Parsed with no reviver and restringified :
  1091. null
  1092. === Parsed with reviver2 and restringified :
  1093. null
  1094. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1095. null
  1096. === Parsed with no reviver and restringified :
  1097. null
  1098. === Parsed with reviver2 and restringified :
  1099. null
  1100. ------ JSON test stringify: bool(true) ------
  1101. true
  1102. === Parsed with no reviver and restringified :
  1103. true
  1104. === Parsed with reviver2 and restringified :
  1105. 99
  1106. ------ JSON test stringify: bool(false) ------
  1107. false
  1108. === Parsed with no reviver and restringified :
  1109. false
  1110. === Parsed with reviver2 and restringified :
  1111. false
  1112. ------ JSON test stringify: null ------
  1113. null
  1114. === Parsed with no reviver and restringified :
  1115. null
  1116. === Parsed with reviver2 and restringified :
  1117. null
  1118. ------ JSON test stringify: undefined ------
  1119. undefined
  1120. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1121. ------ JSON test stringify: Date(2008, 10, 10) ------
  1122. "2008-11-10T08:00:00.000Z"
  1123. === Parsed with no reviver and restringified :
  1124. "2008-11-10T08:00:00.000Z"
  1125. === Parsed with reviver2 and restringified :
  1126. "2008-11-10T08:00:00.000Z"
  1127. ------ JSON test stringify: string in Object ------
  1128. "hello"
  1129. === Parsed with no reviver and restringified :
  1130. "hello"
  1131. === Parsed with reviver2 and restringified :
  1132. "hello"
  1133. ------ JSON test stringify: number in Object ------
  1134. 33
  1135. === Parsed with no reviver and restringified :
  1136. 33
  1137. === Parsed with reviver2 and restringified :
  1138. 33
  1139. ------ JSON test stringify: bool in Object ------
  1140. true
  1141. === Parsed with no reviver and restringified :
  1142. true
  1143. === Parsed with reviver2 and restringified :
  1144. 99
  1145. ------ JSON test stringify: SimpleObject ------
  1146. {}
  1147. === Parsed with no reviver and restringified :
  1148. {}
  1149. === Parsed with reviver2 and restringified :
  1150. {}
  1151. ------ JSON test stringify: Object with nested objects and array ------
  1152. {}
  1153. === Parsed with no reviver and restringified :
  1154. {}
  1155. === Parsed with reviver2 and restringified :
  1156. {}
  1157. ------ JSON test stringify: Simple array ------
  1158. [
  1159. "document.location",
  1160. "foolish"
  1161. ]
  1162. === Parsed with no reviver and restringified :
  1163. ["document.location","foolish"]
  1164. === Parsed with reviver2 and restringified :
  1165. ["document.location","foolish"]
  1166. ------ JSON test stringify: Complex array ------
  1167. [
  1168. "document.location",
  1169. "foolish",
  1170. 12.3,
  1171. "2008-10-09T07:00:00.000Z",
  1172. {},
  1173. null,
  1174. {},
  1175. null,
  1176. null,
  1177. null,
  1178. [
  1179. "NestedArray_1stParamString",
  1180. 3.14,
  1181. {},
  1182. null,
  1183. []
  1184. ],
  1185. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1186. ]
  1187. === Parsed with no reviver and restringified :
  1188. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1189. === Parsed with reviver2 and restringified :
  1190. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1191. ------ JSON test stringify: complex string 2 ------
  1192. PASS
  1193. === Parsed with no reviver and restringified :
  1194. PASS
  1195. === Parsed with reviver2 and restringified :
  1196. PASS
  1197. *************************** JSON test stringify: replacer: array replacer: [] space: string : ........................ ***********************
  1198. ------ JSON test stringify: String simple ------
  1199. "SampleTest"
  1200. === Parsed with no reviver and restringified :
  1201. "SampleTest"
  1202. === Parsed with reviver2 and restringified :
  1203. "SampleTest"
  1204. ------ JSON test stringify: Number(1) ------
  1205. 1
  1206. === Parsed with no reviver and restringified :
  1207. 1
  1208. === Parsed with reviver2 and restringified :
  1209. 99
  1210. ------ JSON test stringify: Number(1234) ------
  1211. 12345
  1212. === Parsed with no reviver and restringified :
  1213. 12345
  1214. === Parsed with reviver2 and restringified :
  1215. 12345
  1216. ------ JSON test stringify: Number(3.14) ------
  1217. 3.14
  1218. === Parsed with no reviver and restringified :
  1219. 3.14
  1220. === Parsed with reviver2 and restringified :
  1221. undefined
  1222. ------ JSON test stringify: Number(NaN) ------
  1223. null
  1224. === Parsed with no reviver and restringified :
  1225. null
  1226. === Parsed with reviver2 and restringified :
  1227. null
  1228. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1229. null
  1230. === Parsed with no reviver and restringified :
  1231. null
  1232. === Parsed with reviver2 and restringified :
  1233. null
  1234. ------ JSON test stringify: bool(true) ------
  1235. true
  1236. === Parsed with no reviver and restringified :
  1237. true
  1238. === Parsed with reviver2 and restringified :
  1239. 99
  1240. ------ JSON test stringify: bool(false) ------
  1241. false
  1242. === Parsed with no reviver and restringified :
  1243. false
  1244. === Parsed with reviver2 and restringified :
  1245. false
  1246. ------ JSON test stringify: null ------
  1247. null
  1248. === Parsed with no reviver and restringified :
  1249. null
  1250. === Parsed with reviver2 and restringified :
  1251. null
  1252. ------ JSON test stringify: undefined ------
  1253. undefined
  1254. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1255. ------ JSON test stringify: Date(2008, 10, 10) ------
  1256. "2008-11-10T08:00:00.000Z"
  1257. === Parsed with no reviver and restringified :
  1258. "2008-11-10T08:00:00.000Z"
  1259. === Parsed with reviver2 and restringified :
  1260. "2008-11-10T08:00:00.000Z"
  1261. ------ JSON test stringify: string in Object ------
  1262. "hello"
  1263. === Parsed with no reviver and restringified :
  1264. "hello"
  1265. === Parsed with reviver2 and restringified :
  1266. "hello"
  1267. ------ JSON test stringify: number in Object ------
  1268. 33
  1269. === Parsed with no reviver and restringified :
  1270. 33
  1271. === Parsed with reviver2 and restringified :
  1272. 33
  1273. ------ JSON test stringify: bool in Object ------
  1274. true
  1275. === Parsed with no reviver and restringified :
  1276. true
  1277. === Parsed with reviver2 and restringified :
  1278. 99
  1279. ------ JSON test stringify: SimpleObject ------
  1280. {}
  1281. === Parsed with no reviver and restringified :
  1282. {}
  1283. === Parsed with reviver2 and restringified :
  1284. {}
  1285. ------ JSON test stringify: Object with nested objects and array ------
  1286. {}
  1287. === Parsed with no reviver and restringified :
  1288. {}
  1289. === Parsed with reviver2 and restringified :
  1290. {}
  1291. ------ JSON test stringify: Simple array ------
  1292. [
  1293. .........."document.location",
  1294. .........."foolish"
  1295. ]
  1296. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  1297. ------ JSON test stringify: Complex array ------
  1298. [
  1299. .........."document.location",
  1300. .........."foolish",
  1301. ..........12.3,
  1302. .........."2008-10-09T07:00:00.000Z",
  1303. ..........{},
  1304. ..........null,
  1305. ..........{},
  1306. ..........null,
  1307. ..........null,
  1308. ..........null,
  1309. ..........[
  1310. ...................."NestedArray_1stParamString",
  1311. ....................3.14,
  1312. ....................{},
  1313. ....................null,
  1314. ....................[]
  1315. ..........],
  1316. .........."[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1317. ]
  1318. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  1319. ------ JSON test stringify: complex string 2 ------
  1320. PASS
  1321. === Parsed with no reviver and restringified :
  1322. PASS
  1323. === Parsed with reviver2 and restringified :
  1324. PASS
  1325. *************************** JSON test stringify: replacer: array replacer: ["a","b"] space: null ***********************
  1326. ------ JSON test stringify: String simple ------
  1327. "SampleTest"
  1328. === Parsed with no reviver and restringified :
  1329. "SampleTest"
  1330. === Parsed with reviver2 and restringified :
  1331. "SampleTest"
  1332. ------ JSON test stringify: Number(1) ------
  1333. 1
  1334. === Parsed with no reviver and restringified :
  1335. 1
  1336. === Parsed with reviver2 and restringified :
  1337. 99
  1338. ------ JSON test stringify: Number(1234) ------
  1339. 12345
  1340. === Parsed with no reviver and restringified :
  1341. 12345
  1342. === Parsed with reviver2 and restringified :
  1343. 12345
  1344. ------ JSON test stringify: Number(3.14) ------
  1345. 3.14
  1346. === Parsed with no reviver and restringified :
  1347. 3.14
  1348. === Parsed with reviver2 and restringified :
  1349. undefined
  1350. ------ JSON test stringify: Number(NaN) ------
  1351. null
  1352. === Parsed with no reviver and restringified :
  1353. null
  1354. === Parsed with reviver2 and restringified :
  1355. null
  1356. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1357. null
  1358. === Parsed with no reviver and restringified :
  1359. null
  1360. === Parsed with reviver2 and restringified :
  1361. null
  1362. ------ JSON test stringify: bool(true) ------
  1363. true
  1364. === Parsed with no reviver and restringified :
  1365. true
  1366. === Parsed with reviver2 and restringified :
  1367. 99
  1368. ------ JSON test stringify: bool(false) ------
  1369. false
  1370. === Parsed with no reviver and restringified :
  1371. false
  1372. === Parsed with reviver2 and restringified :
  1373. false
  1374. ------ JSON test stringify: null ------
  1375. null
  1376. === Parsed with no reviver and restringified :
  1377. null
  1378. === Parsed with reviver2 and restringified :
  1379. null
  1380. ------ JSON test stringify: undefined ------
  1381. undefined
  1382. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1383. ------ JSON test stringify: Date(2008, 10, 10) ------
  1384. "2008-11-10T08:00:00.000Z"
  1385. === Parsed with no reviver and restringified :
  1386. "2008-11-10T08:00:00.000Z"
  1387. === Parsed with reviver2 and restringified :
  1388. "2008-11-10T08:00:00.000Z"
  1389. ------ JSON test stringify: string in Object ------
  1390. "hello"
  1391. === Parsed with no reviver and restringified :
  1392. "hello"
  1393. === Parsed with reviver2 and restringified :
  1394. "hello"
  1395. ------ JSON test stringify: number in Object ------
  1396. 33
  1397. === Parsed with no reviver and restringified :
  1398. 33
  1399. === Parsed with reviver2 and restringified :
  1400. 33
  1401. ------ JSON test stringify: bool in Object ------
  1402. true
  1403. === Parsed with no reviver and restringified :
  1404. true
  1405. === Parsed with reviver2 and restringified :
  1406. 99
  1407. ------ JSON test stringify: SimpleObject ------
  1408. {}
  1409. === Parsed with no reviver and restringified :
  1410. {}
  1411. === Parsed with reviver2 and restringified :
  1412. {}
  1413. ------ JSON test stringify: Object with nested objects and array ------
  1414. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1415. === Parsed with no reviver and restringified :
  1416. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1417. === Parsed with reviver2 and restringified :
  1418. {"a":{"a":{},"b":{"a":99,"b":false}}}
  1419. ------ JSON test stringify: Simple array ------
  1420. ["document.location","foolish"]
  1421. === Parsed with no reviver and restringified :
  1422. ["document.location","foolish"]
  1423. === Parsed with reviver2 and restringified :
  1424. ["document.location","foolish"]
  1425. ------ JSON test stringify: Complex array ------
  1426. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1427. === Parsed with no reviver and restringified :
  1428. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1429. === Parsed with reviver2 and restringified :
  1430. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1431. ------ JSON test stringify: complex string 2 ------
  1432. PASS
  1433. === Parsed with no reviver and restringified :
  1434. PASS
  1435. === Parsed with reviver2 and restringified :
  1436. PASS
  1437. *************************** JSON test stringify: replacer: array replacer: ["a","b"] space: number 4 ***********************
  1438. ------ JSON test stringify: String simple ------
  1439. "SampleTest"
  1440. === Parsed with no reviver and restringified :
  1441. "SampleTest"
  1442. === Parsed with reviver2 and restringified :
  1443. "SampleTest"
  1444. ------ JSON test stringify: Number(1) ------
  1445. 1
  1446. === Parsed with no reviver and restringified :
  1447. 1
  1448. === Parsed with reviver2 and restringified :
  1449. 99
  1450. ------ JSON test stringify: Number(1234) ------
  1451. 12345
  1452. === Parsed with no reviver and restringified :
  1453. 12345
  1454. === Parsed with reviver2 and restringified :
  1455. 12345
  1456. ------ JSON test stringify: Number(3.14) ------
  1457. 3.14
  1458. === Parsed with no reviver and restringified :
  1459. 3.14
  1460. === Parsed with reviver2 and restringified :
  1461. undefined
  1462. ------ JSON test stringify: Number(NaN) ------
  1463. null
  1464. === Parsed with no reviver and restringified :
  1465. null
  1466. === Parsed with reviver2 and restringified :
  1467. null
  1468. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1469. null
  1470. === Parsed with no reviver and restringified :
  1471. null
  1472. === Parsed with reviver2 and restringified :
  1473. null
  1474. ------ JSON test stringify: bool(true) ------
  1475. true
  1476. === Parsed with no reviver and restringified :
  1477. true
  1478. === Parsed with reviver2 and restringified :
  1479. 99
  1480. ------ JSON test stringify: bool(false) ------
  1481. false
  1482. === Parsed with no reviver and restringified :
  1483. false
  1484. === Parsed with reviver2 and restringified :
  1485. false
  1486. ------ JSON test stringify: null ------
  1487. null
  1488. === Parsed with no reviver and restringified :
  1489. null
  1490. === Parsed with reviver2 and restringified :
  1491. null
  1492. ------ JSON test stringify: undefined ------
  1493. undefined
  1494. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1495. ------ JSON test stringify: Date(2008, 10, 10) ------
  1496. "2008-11-10T08:00:00.000Z"
  1497. === Parsed with no reviver and restringified :
  1498. "2008-11-10T08:00:00.000Z"
  1499. === Parsed with reviver2 and restringified :
  1500. "2008-11-10T08:00:00.000Z"
  1501. ------ JSON test stringify: string in Object ------
  1502. "hello"
  1503. === Parsed with no reviver and restringified :
  1504. "hello"
  1505. === Parsed with reviver2 and restringified :
  1506. "hello"
  1507. ------ JSON test stringify: number in Object ------
  1508. 33
  1509. === Parsed with no reviver and restringified :
  1510. 33
  1511. === Parsed with reviver2 and restringified :
  1512. 33
  1513. ------ JSON test stringify: bool in Object ------
  1514. true
  1515. === Parsed with no reviver and restringified :
  1516. true
  1517. === Parsed with reviver2 and restringified :
  1518. 99
  1519. ------ JSON test stringify: SimpleObject ------
  1520. {}
  1521. === Parsed with no reviver and restringified :
  1522. {}
  1523. === Parsed with reviver2 and restringified :
  1524. {}
  1525. ------ JSON test stringify: Object with nested objects and array ------
  1526. {
  1527. "a": {
  1528. "a": {},
  1529. "b": {
  1530. "a": true,
  1531. "b": false
  1532. }
  1533. }
  1534. }
  1535. === Parsed with no reviver and restringified :
  1536. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1537. === Parsed with reviver2 and restringified :
  1538. {"a":{"a":{},"b":{"a":99,"b":false}}}
  1539. ------ JSON test stringify: Simple array ------
  1540. [
  1541. "document.location",
  1542. "foolish"
  1543. ]
  1544. === Parsed with no reviver and restringified :
  1545. ["document.location","foolish"]
  1546. === Parsed with reviver2 and restringified :
  1547. ["document.location","foolish"]
  1548. ------ JSON test stringify: Complex array ------
  1549. [
  1550. "document.location",
  1551. "foolish",
  1552. 12.3,
  1553. "2008-10-09T07:00:00.000Z",
  1554. {},
  1555. null,
  1556. {},
  1557. null,
  1558. null,
  1559. null,
  1560. [
  1561. "NestedArray_1stParamString",
  1562. 3.14,
  1563. {
  1564. "a": "nested object in array"
  1565. },
  1566. null,
  1567. []
  1568. ],
  1569. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1570. ]
  1571. === Parsed with no reviver and restringified :
  1572. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1573. === Parsed with reviver2 and restringified :
  1574. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1575. ------ JSON test stringify: complex string 2 ------
  1576. PASS
  1577. === Parsed with no reviver and restringified :
  1578. PASS
  1579. === Parsed with reviver2 and restringified :
  1580. PASS
  1581. *************************** JSON test stringify: replacer: array replacer: ["a","b"] space: number 24 ***********************
  1582. ------ JSON test stringify: String simple ------
  1583. "SampleTest"
  1584. === Parsed with no reviver and restringified :
  1585. "SampleTest"
  1586. === Parsed with reviver2 and restringified :
  1587. "SampleTest"
  1588. ------ JSON test stringify: Number(1) ------
  1589. 1
  1590. === Parsed with no reviver and restringified :
  1591. 1
  1592. === Parsed with reviver2 and restringified :
  1593. 99
  1594. ------ JSON test stringify: Number(1234) ------
  1595. 12345
  1596. === Parsed with no reviver and restringified :
  1597. 12345
  1598. === Parsed with reviver2 and restringified :
  1599. 12345
  1600. ------ JSON test stringify: Number(3.14) ------
  1601. 3.14
  1602. === Parsed with no reviver and restringified :
  1603. 3.14
  1604. === Parsed with reviver2 and restringified :
  1605. undefined
  1606. ------ JSON test stringify: Number(NaN) ------
  1607. null
  1608. === Parsed with no reviver and restringified :
  1609. null
  1610. === Parsed with reviver2 and restringified :
  1611. null
  1612. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1613. null
  1614. === Parsed with no reviver and restringified :
  1615. null
  1616. === Parsed with reviver2 and restringified :
  1617. null
  1618. ------ JSON test stringify: bool(true) ------
  1619. true
  1620. === Parsed with no reviver and restringified :
  1621. true
  1622. === Parsed with reviver2 and restringified :
  1623. 99
  1624. ------ JSON test stringify: bool(false) ------
  1625. false
  1626. === Parsed with no reviver and restringified :
  1627. false
  1628. === Parsed with reviver2 and restringified :
  1629. false
  1630. ------ JSON test stringify: null ------
  1631. null
  1632. === Parsed with no reviver and restringified :
  1633. null
  1634. === Parsed with reviver2 and restringified :
  1635. null
  1636. ------ JSON test stringify: undefined ------
  1637. undefined
  1638. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1639. ------ JSON test stringify: Date(2008, 10, 10) ------
  1640. "2008-11-10T08:00:00.000Z"
  1641. === Parsed with no reviver and restringified :
  1642. "2008-11-10T08:00:00.000Z"
  1643. === Parsed with reviver2 and restringified :
  1644. "2008-11-10T08:00:00.000Z"
  1645. ------ JSON test stringify: string in Object ------
  1646. "hello"
  1647. === Parsed with no reviver and restringified :
  1648. "hello"
  1649. === Parsed with reviver2 and restringified :
  1650. "hello"
  1651. ------ JSON test stringify: number in Object ------
  1652. 33
  1653. === Parsed with no reviver and restringified :
  1654. 33
  1655. === Parsed with reviver2 and restringified :
  1656. 33
  1657. ------ JSON test stringify: bool in Object ------
  1658. true
  1659. === Parsed with no reviver and restringified :
  1660. true
  1661. === Parsed with reviver2 and restringified :
  1662. 99
  1663. ------ JSON test stringify: SimpleObject ------
  1664. {}
  1665. === Parsed with no reviver and restringified :
  1666. {}
  1667. === Parsed with reviver2 and restringified :
  1668. {}
  1669. ------ JSON test stringify: Object with nested objects and array ------
  1670. {
  1671. "a": {
  1672. "a": {},
  1673. "b": {
  1674. "a": true,
  1675. "b": false
  1676. }
  1677. }
  1678. }
  1679. === Parsed with no reviver and restringified :
  1680. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1681. === Parsed with reviver2 and restringified :
  1682. {"a":{"a":{},"b":{"a":99,"b":false}}}
  1683. ------ JSON test stringify: Simple array ------
  1684. [
  1685. "document.location",
  1686. "foolish"
  1687. ]
  1688. === Parsed with no reviver and restringified :
  1689. ["document.location","foolish"]
  1690. === Parsed with reviver2 and restringified :
  1691. ["document.location","foolish"]
  1692. ------ JSON test stringify: Complex array ------
  1693. [
  1694. "document.location",
  1695. "foolish",
  1696. 12.3,
  1697. "2008-10-09T07:00:00.000Z",
  1698. {},
  1699. null,
  1700. {},
  1701. null,
  1702. null,
  1703. null,
  1704. [
  1705. "NestedArray_1stParamString",
  1706. 3.14,
  1707. {
  1708. "a": "nested object in array"
  1709. },
  1710. null,
  1711. []
  1712. ],
  1713. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1714. ]
  1715. === Parsed with no reviver and restringified :
  1716. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1717. === Parsed with reviver2 and restringified :
  1718. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1719. ------ JSON test stringify: complex string 2 ------
  1720. PASS
  1721. === Parsed with no reviver and restringified :
  1722. PASS
  1723. === Parsed with reviver2 and restringified :
  1724. PASS
  1725. *************************** JSON test stringify: replacer: array replacer: ["a","b"] space: string : ........................ ***********************
  1726. ------ JSON test stringify: String simple ------
  1727. "SampleTest"
  1728. === Parsed with no reviver and restringified :
  1729. "SampleTest"
  1730. === Parsed with reviver2 and restringified :
  1731. "SampleTest"
  1732. ------ JSON test stringify: Number(1) ------
  1733. 1
  1734. === Parsed with no reviver and restringified :
  1735. 1
  1736. === Parsed with reviver2 and restringified :
  1737. 99
  1738. ------ JSON test stringify: Number(1234) ------
  1739. 12345
  1740. === Parsed with no reviver and restringified :
  1741. 12345
  1742. === Parsed with reviver2 and restringified :
  1743. 12345
  1744. ------ JSON test stringify: Number(3.14) ------
  1745. 3.14
  1746. === Parsed with no reviver and restringified :
  1747. 3.14
  1748. === Parsed with reviver2 and restringified :
  1749. undefined
  1750. ------ JSON test stringify: Number(NaN) ------
  1751. null
  1752. === Parsed with no reviver and restringified :
  1753. null
  1754. === Parsed with reviver2 and restringified :
  1755. null
  1756. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1757. null
  1758. === Parsed with no reviver and restringified :
  1759. null
  1760. === Parsed with reviver2 and restringified :
  1761. null
  1762. ------ JSON test stringify: bool(true) ------
  1763. true
  1764. === Parsed with no reviver and restringified :
  1765. true
  1766. === Parsed with reviver2 and restringified :
  1767. 99
  1768. ------ JSON test stringify: bool(false) ------
  1769. false
  1770. === Parsed with no reviver and restringified :
  1771. false
  1772. === Parsed with reviver2 and restringified :
  1773. false
  1774. ------ JSON test stringify: null ------
  1775. null
  1776. === Parsed with no reviver and restringified :
  1777. null
  1778. === Parsed with reviver2 and restringified :
  1779. null
  1780. ------ JSON test stringify: undefined ------
  1781. undefined
  1782. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1783. ------ JSON test stringify: Date(2008, 10, 10) ------
  1784. "2008-11-10T08:00:00.000Z"
  1785. === Parsed with no reviver and restringified :
  1786. "2008-11-10T08:00:00.000Z"
  1787. === Parsed with reviver2 and restringified :
  1788. "2008-11-10T08:00:00.000Z"
  1789. ------ JSON test stringify: string in Object ------
  1790. "hello"
  1791. === Parsed with no reviver and restringified :
  1792. "hello"
  1793. === Parsed with reviver2 and restringified :
  1794. "hello"
  1795. ------ JSON test stringify: number in Object ------
  1796. 33
  1797. === Parsed with no reviver and restringified :
  1798. 33
  1799. === Parsed with reviver2 and restringified :
  1800. 33
  1801. ------ JSON test stringify: bool in Object ------
  1802. true
  1803. === Parsed with no reviver and restringified :
  1804. true
  1805. === Parsed with reviver2 and restringified :
  1806. 99
  1807. ------ JSON test stringify: SimpleObject ------
  1808. {}
  1809. === Parsed with no reviver and restringified :
  1810. {}
  1811. === Parsed with reviver2 and restringified :
  1812. {}
  1813. ------ JSON test stringify: Object with nested objects and array ------
  1814. {
  1815. .........."a": {
  1816. ...................."a": {},
  1817. ...................."b": {
  1818. .............................."a": true,
  1819. .............................."b": false
  1820. ....................}
  1821. ..........}
  1822. }
  1823. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  1824. ------ JSON test stringify: Simple array ------
  1825. [
  1826. .........."document.location",
  1827. .........."foolish"
  1828. ]
  1829. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  1830. ------ JSON test stringify: Complex array ------
  1831. [
  1832. .........."document.location",
  1833. .........."foolish",
  1834. ..........12.3,
  1835. .........."2008-10-09T07:00:00.000Z",
  1836. ..........{},
  1837. ..........null,
  1838. ..........{},
  1839. ..........null,
  1840. ..........null,
  1841. ..........null,
  1842. ..........[
  1843. ...................."NestedArray_1stParamString",
  1844. ....................3.14,
  1845. ....................{
  1846. .............................."a": "nested object in array"
  1847. ....................},
  1848. ....................null,
  1849. ....................[]
  1850. ..........],
  1851. .........."[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  1852. ]
  1853. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  1854. ------ JSON test stringify: complex string 2 ------
  1855. PASS
  1856. === Parsed with no reviver and restringified :
  1857. PASS
  1858. === Parsed with reviver2 and restringified :
  1859. PASS
  1860. *************************** JSON test stringify: replacer: array replacer: ["a","b","a","a"] space: null ***********************
  1861. ------ JSON test stringify: String simple ------
  1862. "SampleTest"
  1863. === Parsed with no reviver and restringified :
  1864. "SampleTest"
  1865. === Parsed with reviver2 and restringified :
  1866. "SampleTest"
  1867. ------ JSON test stringify: Number(1) ------
  1868. 1
  1869. === Parsed with no reviver and restringified :
  1870. 1
  1871. === Parsed with reviver2 and restringified :
  1872. 99
  1873. ------ JSON test stringify: Number(1234) ------
  1874. 12345
  1875. === Parsed with no reviver and restringified :
  1876. 12345
  1877. === Parsed with reviver2 and restringified :
  1878. 12345
  1879. ------ JSON test stringify: Number(3.14) ------
  1880. 3.14
  1881. === Parsed with no reviver and restringified :
  1882. 3.14
  1883. === Parsed with reviver2 and restringified :
  1884. undefined
  1885. ------ JSON test stringify: Number(NaN) ------
  1886. null
  1887. === Parsed with no reviver and restringified :
  1888. null
  1889. === Parsed with reviver2 and restringified :
  1890. null
  1891. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  1892. null
  1893. === Parsed with no reviver and restringified :
  1894. null
  1895. === Parsed with reviver2 and restringified :
  1896. null
  1897. ------ JSON test stringify: bool(true) ------
  1898. true
  1899. === Parsed with no reviver and restringified :
  1900. true
  1901. === Parsed with reviver2 and restringified :
  1902. 99
  1903. ------ JSON test stringify: bool(false) ------
  1904. false
  1905. === Parsed with no reviver and restringified :
  1906. false
  1907. === Parsed with reviver2 and restringified :
  1908. false
  1909. ------ JSON test stringify: null ------
  1910. null
  1911. === Parsed with no reviver and restringified :
  1912. null
  1913. === Parsed with reviver2 and restringified :
  1914. null
  1915. ------ JSON test stringify: undefined ------
  1916. undefined
  1917. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  1918. ------ JSON test stringify: Date(2008, 10, 10) ------
  1919. "2008-11-10T08:00:00.000Z"
  1920. === Parsed with no reviver and restringified :
  1921. "2008-11-10T08:00:00.000Z"
  1922. === Parsed with reviver2 and restringified :
  1923. "2008-11-10T08:00:00.000Z"
  1924. ------ JSON test stringify: string in Object ------
  1925. "hello"
  1926. === Parsed with no reviver and restringified :
  1927. "hello"
  1928. === Parsed with reviver2 and restringified :
  1929. "hello"
  1930. ------ JSON test stringify: number in Object ------
  1931. 33
  1932. === Parsed with no reviver and restringified :
  1933. 33
  1934. === Parsed with reviver2 and restringified :
  1935. 33
  1936. ------ JSON test stringify: bool in Object ------
  1937. true
  1938. === Parsed with no reviver and restringified :
  1939. true
  1940. === Parsed with reviver2 and restringified :
  1941. 99
  1942. ------ JSON test stringify: SimpleObject ------
  1943. {}
  1944. === Parsed with no reviver and restringified :
  1945. {}
  1946. === Parsed with reviver2 and restringified :
  1947. {}
  1948. ------ JSON test stringify: Object with nested objects and array ------
  1949. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1950. === Parsed with no reviver and restringified :
  1951. {"a":{"a":{},"b":{"a":true,"b":false}}}
  1952. === Parsed with reviver2 and restringified :
  1953. {"a":{"a":{},"b":{"a":99,"b":false}}}
  1954. ------ JSON test stringify: Simple array ------
  1955. ["document.location","foolish"]
  1956. === Parsed with no reviver and restringified :
  1957. ["document.location","foolish"]
  1958. === Parsed with reviver2 and restringified :
  1959. ["document.location","foolish"]
  1960. ------ JSON test stringify: Complex array ------
  1961. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1962. === Parsed with no reviver and restringified :
  1963. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1964. === Parsed with reviver2 and restringified :
  1965. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  1966. ------ JSON test stringify: complex string 2 ------
  1967. PASS
  1968. === Parsed with no reviver and restringified :
  1969. PASS
  1970. === Parsed with reviver2 and restringified :
  1971. PASS
  1972. *************************** JSON test stringify: replacer: array replacer: ["a","b","a","a"] space: number 4 ***********************
  1973. ------ JSON test stringify: String simple ------
  1974. "SampleTest"
  1975. === Parsed with no reviver and restringified :
  1976. "SampleTest"
  1977. === Parsed with reviver2 and restringified :
  1978. "SampleTest"
  1979. ------ JSON test stringify: Number(1) ------
  1980. 1
  1981. === Parsed with no reviver and restringified :
  1982. 1
  1983. === Parsed with reviver2 and restringified :
  1984. 99
  1985. ------ JSON test stringify: Number(1234) ------
  1986. 12345
  1987. === Parsed with no reviver and restringified :
  1988. 12345
  1989. === Parsed with reviver2 and restringified :
  1990. 12345
  1991. ------ JSON test stringify: Number(3.14) ------
  1992. 3.14
  1993. === Parsed with no reviver and restringified :
  1994. 3.14
  1995. === Parsed with reviver2 and restringified :
  1996. undefined
  1997. ------ JSON test stringify: Number(NaN) ------
  1998. null
  1999. === Parsed with no reviver and restringified :
  2000. null
  2001. === Parsed with reviver2 and restringified :
  2002. null
  2003. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2004. null
  2005. === Parsed with no reviver and restringified :
  2006. null
  2007. === Parsed with reviver2 and restringified :
  2008. null
  2009. ------ JSON test stringify: bool(true) ------
  2010. true
  2011. === Parsed with no reviver and restringified :
  2012. true
  2013. === Parsed with reviver2 and restringified :
  2014. 99
  2015. ------ JSON test stringify: bool(false) ------
  2016. false
  2017. === Parsed with no reviver and restringified :
  2018. false
  2019. === Parsed with reviver2 and restringified :
  2020. false
  2021. ------ JSON test stringify: null ------
  2022. null
  2023. === Parsed with no reviver and restringified :
  2024. null
  2025. === Parsed with reviver2 and restringified :
  2026. null
  2027. ------ JSON test stringify: undefined ------
  2028. undefined
  2029. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2030. ------ JSON test stringify: Date(2008, 10, 10) ------
  2031. "2008-11-10T08:00:00.000Z"
  2032. === Parsed with no reviver and restringified :
  2033. "2008-11-10T08:00:00.000Z"
  2034. === Parsed with reviver2 and restringified :
  2035. "2008-11-10T08:00:00.000Z"
  2036. ------ JSON test stringify: string in Object ------
  2037. "hello"
  2038. === Parsed with no reviver and restringified :
  2039. "hello"
  2040. === Parsed with reviver2 and restringified :
  2041. "hello"
  2042. ------ JSON test stringify: number in Object ------
  2043. 33
  2044. === Parsed with no reviver and restringified :
  2045. 33
  2046. === Parsed with reviver2 and restringified :
  2047. 33
  2048. ------ JSON test stringify: bool in Object ------
  2049. true
  2050. === Parsed with no reviver and restringified :
  2051. true
  2052. === Parsed with reviver2 and restringified :
  2053. 99
  2054. ------ JSON test stringify: SimpleObject ------
  2055. {}
  2056. === Parsed with no reviver and restringified :
  2057. {}
  2058. === Parsed with reviver2 and restringified :
  2059. {}
  2060. ------ JSON test stringify: Object with nested objects and array ------
  2061. {
  2062. "a": {
  2063. "a": {},
  2064. "b": {
  2065. "a": true,
  2066. "b": false
  2067. }
  2068. }
  2069. }
  2070. === Parsed with no reviver and restringified :
  2071. {"a":{"a":{},"b":{"a":true,"b":false}}}
  2072. === Parsed with reviver2 and restringified :
  2073. {"a":{"a":{},"b":{"a":99,"b":false}}}
  2074. ------ JSON test stringify: Simple array ------
  2075. [
  2076. "document.location",
  2077. "foolish"
  2078. ]
  2079. === Parsed with no reviver and restringified :
  2080. ["document.location","foolish"]
  2081. === Parsed with reviver2 and restringified :
  2082. ["document.location","foolish"]
  2083. ------ JSON test stringify: Complex array ------
  2084. [
  2085. "document.location",
  2086. "foolish",
  2087. 12.3,
  2088. "2008-10-09T07:00:00.000Z",
  2089. {},
  2090. null,
  2091. {},
  2092. null,
  2093. null,
  2094. null,
  2095. [
  2096. "NestedArray_1stParamString",
  2097. 3.14,
  2098. {
  2099. "a": "nested object in array"
  2100. },
  2101. null,
  2102. []
  2103. ],
  2104. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  2105. ]
  2106. === Parsed with no reviver and restringified :
  2107. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2108. === Parsed with reviver2 and restringified :
  2109. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2110. ------ JSON test stringify: complex string 2 ------
  2111. PASS
  2112. === Parsed with no reviver and restringified :
  2113. PASS
  2114. === Parsed with reviver2 and restringified :
  2115. PASS
  2116. *************************** JSON test stringify: replacer: array replacer: ["a","b","a","a"] space: number 24 ***********************
  2117. ------ JSON test stringify: String simple ------
  2118. "SampleTest"
  2119. === Parsed with no reviver and restringified :
  2120. "SampleTest"
  2121. === Parsed with reviver2 and restringified :
  2122. "SampleTest"
  2123. ------ JSON test stringify: Number(1) ------
  2124. 1
  2125. === Parsed with no reviver and restringified :
  2126. 1
  2127. === Parsed with reviver2 and restringified :
  2128. 99
  2129. ------ JSON test stringify: Number(1234) ------
  2130. 12345
  2131. === Parsed with no reviver and restringified :
  2132. 12345
  2133. === Parsed with reviver2 and restringified :
  2134. 12345
  2135. ------ JSON test stringify: Number(3.14) ------
  2136. 3.14
  2137. === Parsed with no reviver and restringified :
  2138. 3.14
  2139. === Parsed with reviver2 and restringified :
  2140. undefined
  2141. ------ JSON test stringify: Number(NaN) ------
  2142. null
  2143. === Parsed with no reviver and restringified :
  2144. null
  2145. === Parsed with reviver2 and restringified :
  2146. null
  2147. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2148. null
  2149. === Parsed with no reviver and restringified :
  2150. null
  2151. === Parsed with reviver2 and restringified :
  2152. null
  2153. ------ JSON test stringify: bool(true) ------
  2154. true
  2155. === Parsed with no reviver and restringified :
  2156. true
  2157. === Parsed with reviver2 and restringified :
  2158. 99
  2159. ------ JSON test stringify: bool(false) ------
  2160. false
  2161. === Parsed with no reviver and restringified :
  2162. false
  2163. === Parsed with reviver2 and restringified :
  2164. false
  2165. ------ JSON test stringify: null ------
  2166. null
  2167. === Parsed with no reviver and restringified :
  2168. null
  2169. === Parsed with reviver2 and restringified :
  2170. null
  2171. ------ JSON test stringify: undefined ------
  2172. undefined
  2173. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2174. ------ JSON test stringify: Date(2008, 10, 10) ------
  2175. "2008-11-10T08:00:00.000Z"
  2176. === Parsed with no reviver and restringified :
  2177. "2008-11-10T08:00:00.000Z"
  2178. === Parsed with reviver2 and restringified :
  2179. "2008-11-10T08:00:00.000Z"
  2180. ------ JSON test stringify: string in Object ------
  2181. "hello"
  2182. === Parsed with no reviver and restringified :
  2183. "hello"
  2184. === Parsed with reviver2 and restringified :
  2185. "hello"
  2186. ------ JSON test stringify: number in Object ------
  2187. 33
  2188. === Parsed with no reviver and restringified :
  2189. 33
  2190. === Parsed with reviver2 and restringified :
  2191. 33
  2192. ------ JSON test stringify: bool in Object ------
  2193. true
  2194. === Parsed with no reviver and restringified :
  2195. true
  2196. === Parsed with reviver2 and restringified :
  2197. 99
  2198. ------ JSON test stringify: SimpleObject ------
  2199. {}
  2200. === Parsed with no reviver and restringified :
  2201. {}
  2202. === Parsed with reviver2 and restringified :
  2203. {}
  2204. ------ JSON test stringify: Object with nested objects and array ------
  2205. {
  2206. "a": {
  2207. "a": {},
  2208. "b": {
  2209. "a": true,
  2210. "b": false
  2211. }
  2212. }
  2213. }
  2214. === Parsed with no reviver and restringified :
  2215. {"a":{"a":{},"b":{"a":true,"b":false}}}
  2216. === Parsed with reviver2 and restringified :
  2217. {"a":{"a":{},"b":{"a":99,"b":false}}}
  2218. ------ JSON test stringify: Simple array ------
  2219. [
  2220. "document.location",
  2221. "foolish"
  2222. ]
  2223. === Parsed with no reviver and restringified :
  2224. ["document.location","foolish"]
  2225. === Parsed with reviver2 and restringified :
  2226. ["document.location","foolish"]
  2227. ------ JSON test stringify: Complex array ------
  2228. [
  2229. "document.location",
  2230. "foolish",
  2231. 12.3,
  2232. "2008-10-09T07:00:00.000Z",
  2233. {},
  2234. null,
  2235. {},
  2236. null,
  2237. null,
  2238. null,
  2239. [
  2240. "NestedArray_1stParamString",
  2241. 3.14,
  2242. {
  2243. "a": "nested object in array"
  2244. },
  2245. null,
  2246. []
  2247. ],
  2248. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  2249. ]
  2250. === Parsed with no reviver and restringified :
  2251. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2252. === Parsed with reviver2 and restringified :
  2253. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array"},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2254. ------ JSON test stringify: complex string 2 ------
  2255. PASS
  2256. === Parsed with no reviver and restringified :
  2257. PASS
  2258. === Parsed with reviver2 and restringified :
  2259. PASS
  2260. *************************** JSON test stringify: replacer: array replacer: ["a","b","a","a"] space: string : ........................ ***********************
  2261. ------ JSON test stringify: String simple ------
  2262. "SampleTest"
  2263. === Parsed with no reviver and restringified :
  2264. "SampleTest"
  2265. === Parsed with reviver2 and restringified :
  2266. "SampleTest"
  2267. ------ JSON test stringify: Number(1) ------
  2268. 1
  2269. === Parsed with no reviver and restringified :
  2270. 1
  2271. === Parsed with reviver2 and restringified :
  2272. 99
  2273. ------ JSON test stringify: Number(1234) ------
  2274. 12345
  2275. === Parsed with no reviver and restringified :
  2276. 12345
  2277. === Parsed with reviver2 and restringified :
  2278. 12345
  2279. ------ JSON test stringify: Number(3.14) ------
  2280. 3.14
  2281. === Parsed with no reviver and restringified :
  2282. 3.14
  2283. === Parsed with reviver2 and restringified :
  2284. undefined
  2285. ------ JSON test stringify: Number(NaN) ------
  2286. null
  2287. === Parsed with no reviver and restringified :
  2288. null
  2289. === Parsed with reviver2 and restringified :
  2290. null
  2291. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2292. null
  2293. === Parsed with no reviver and restringified :
  2294. null
  2295. === Parsed with reviver2 and restringified :
  2296. null
  2297. ------ JSON test stringify: bool(true) ------
  2298. true
  2299. === Parsed with no reviver and restringified :
  2300. true
  2301. === Parsed with reviver2 and restringified :
  2302. 99
  2303. ------ JSON test stringify: bool(false) ------
  2304. false
  2305. === Parsed with no reviver and restringified :
  2306. false
  2307. === Parsed with reviver2 and restringified :
  2308. false
  2309. ------ JSON test stringify: null ------
  2310. null
  2311. === Parsed with no reviver and restringified :
  2312. null
  2313. === Parsed with reviver2 and restringified :
  2314. null
  2315. ------ JSON test stringify: undefined ------
  2316. undefined
  2317. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2318. ------ JSON test stringify: Date(2008, 10, 10) ------
  2319. "2008-11-10T08:00:00.000Z"
  2320. === Parsed with no reviver and restringified :
  2321. "2008-11-10T08:00:00.000Z"
  2322. === Parsed with reviver2 and restringified :
  2323. "2008-11-10T08:00:00.000Z"
  2324. ------ JSON test stringify: string in Object ------
  2325. "hello"
  2326. === Parsed with no reviver and restringified :
  2327. "hello"
  2328. === Parsed with reviver2 and restringified :
  2329. "hello"
  2330. ------ JSON test stringify: number in Object ------
  2331. 33
  2332. === Parsed with no reviver and restringified :
  2333. 33
  2334. === Parsed with reviver2 and restringified :
  2335. 33
  2336. ------ JSON test stringify: bool in Object ------
  2337. true
  2338. === Parsed with no reviver and restringified :
  2339. true
  2340. === Parsed with reviver2 and restringified :
  2341. 99
  2342. ------ JSON test stringify: SimpleObject ------
  2343. {}
  2344. === Parsed with no reviver and restringified :
  2345. {}
  2346. === Parsed with reviver2 and restringified :
  2347. {}
  2348. ------ JSON test stringify: Object with nested objects and array ------
  2349. {
  2350. .........."a": {
  2351. ...................."a": {},
  2352. ...................."b": {
  2353. .............................."a": true,
  2354. .............................."b": false
  2355. ....................}
  2356. ..........}
  2357. }
  2358. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2359. ------ JSON test stringify: Simple array ------
  2360. [
  2361. .........."document.location",
  2362. .........."foolish"
  2363. ]
  2364. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2365. ------ JSON test stringify: Complex array ------
  2366. [
  2367. .........."document.location",
  2368. .........."foolish",
  2369. ..........12.3,
  2370. .........."2008-10-09T07:00:00.000Z",
  2371. ..........{},
  2372. ..........null,
  2373. ..........{},
  2374. ..........null,
  2375. ..........null,
  2376. ..........null,
  2377. ..........[
  2378. ...................."NestedArray_1stParamString",
  2379. ....................3.14,
  2380. ....................{
  2381. .............................."a": "nested object in array"
  2382. ....................},
  2383. ....................null,
  2384. ....................[]
  2385. ..........],
  2386. .........."[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  2387. ]
  2388. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2389. ------ JSON test stringify: complex string 2 ------
  2390. PASS
  2391. === Parsed with no reviver and restringified :
  2392. PASS
  2393. === Parsed with reviver2 and restringified :
  2394. PASS
  2395. *************************** JSON test stringify: replacer: replacer function, if the key is 'a' and the holder has a prop 'b', replace the value of the prop 'a' with the value of prop b space: null ***********************
  2396. ------ JSON test stringify: String simple ------
  2397. "SampleTest"
  2398. === Parsed with no reviver and restringified :
  2399. "SampleTest"
  2400. === Parsed with reviver2 and restringified :
  2401. "SampleTest"
  2402. ------ JSON test stringify: Number(1) ------
  2403. 1
  2404. === Parsed with no reviver and restringified :
  2405. 1
  2406. === Parsed with reviver2 and restringified :
  2407. 99
  2408. ------ JSON test stringify: Number(1234) ------
  2409. 12345
  2410. === Parsed with no reviver and restringified :
  2411. 12345
  2412. === Parsed with reviver2 and restringified :
  2413. 12345
  2414. ------ JSON test stringify: Number(3.14) ------
  2415. 3.14
  2416. === Parsed with no reviver and restringified :
  2417. 3.14
  2418. === Parsed with reviver2 and restringified :
  2419. undefined
  2420. ------ JSON test stringify: Number(NaN) ------
  2421. null
  2422. === Parsed with no reviver and restringified :
  2423. null
  2424. === Parsed with reviver2 and restringified :
  2425. null
  2426. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2427. null
  2428. === Parsed with no reviver and restringified :
  2429. null
  2430. === Parsed with reviver2 and restringified :
  2431. null
  2432. ------ JSON test stringify: bool(true) ------
  2433. true
  2434. === Parsed with no reviver and restringified :
  2435. true
  2436. === Parsed with reviver2 and restringified :
  2437. 99
  2438. ------ JSON test stringify: bool(false) ------
  2439. false
  2440. === Parsed with no reviver and restringified :
  2441. false
  2442. === Parsed with reviver2 and restringified :
  2443. false
  2444. ------ JSON test stringify: null ------
  2445. null
  2446. === Parsed with no reviver and restringified :
  2447. null
  2448. === Parsed with reviver2 and restringified :
  2449. null
  2450. ------ JSON test stringify: undefined ------
  2451. undefined
  2452. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2453. ------ JSON test stringify: Date(2008, 10, 10) ------
  2454. "2008-11-10T08:00:00.000Z"
  2455. === Parsed with no reviver and restringified :
  2456. "2008-11-10T08:00:00.000Z"
  2457. === Parsed with reviver2 and restringified :
  2458. "2008-11-10T08:00:00.000Z"
  2459. ------ JSON test stringify: string in Object ------
  2460. "hello"
  2461. === Parsed with no reviver and restringified :
  2462. "hello"
  2463. === Parsed with reviver2 and restringified :
  2464. "hello"
  2465. ------ JSON test stringify: number in Object ------
  2466. 33
  2467. === Parsed with no reviver and restringified :
  2468. 33
  2469. === Parsed with reviver2 and restringified :
  2470. 33
  2471. ------ JSON test stringify: bool in Object ------
  2472. true
  2473. === Parsed with no reviver and restringified :
  2474. true
  2475. === Parsed with reviver2 and restringified :
  2476. 99
  2477. ------ JSON test stringify: SimpleObject ------
  2478. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2479. === Parsed with no reviver and restringified :
  2480. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2481. === Parsed with reviver2 and restringified :
  2482. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2483. ------ JSON test stringify: Object with nested objects and array ------
  2484. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false,"c":3.14},"nestedM2":1234,"b":{"a":false,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2485. === Parsed with no reviver and restringified :
  2486. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false,"c":3.14},"nestedM2":1234,"b":{"a":false,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2487. === Parsed with reviver2 and restringified :
  2488. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false},"nestedM2":1234,"b":{"a":false,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2489. ------ JSON test stringify: Simple array ------
  2490. ["document.location","foolish"]
  2491. === Parsed with no reviver and restringified :
  2492. ["document.location","foolish"]
  2493. === Parsed with reviver2 and restringified :
  2494. ["document.location","foolish"]
  2495. ------ JSON test stringify: Complex array ------
  2496. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2497. === Parsed with no reviver and restringified :
  2498. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2499. === Parsed with reviver2 and restringified :
  2500. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2501. ------ JSON test stringify: complex string 2 ------
  2502. PASS
  2503. === Parsed with no reviver and restringified :
  2504. PASS
  2505. === Parsed with reviver2 and restringified :
  2506. PASS
  2507. *************************** JSON test stringify: replacer: replacer function, if the key is 'a' and the holder has a prop 'b', replace the value of the prop 'a' with the value of prop b space: number 4 ***********************
  2508. ------ JSON test stringify: String simple ------
  2509. "SampleTest"
  2510. === Parsed with no reviver and restringified :
  2511. "SampleTest"
  2512. === Parsed with reviver2 and restringified :
  2513. "SampleTest"
  2514. ------ JSON test stringify: Number(1) ------
  2515. 1
  2516. === Parsed with no reviver and restringified :
  2517. 1
  2518. === Parsed with reviver2 and restringified :
  2519. 99
  2520. ------ JSON test stringify: Number(1234) ------
  2521. 12345
  2522. === Parsed with no reviver and restringified :
  2523. 12345
  2524. === Parsed with reviver2 and restringified :
  2525. 12345
  2526. ------ JSON test stringify: Number(3.14) ------
  2527. 3.14
  2528. === Parsed with no reviver and restringified :
  2529. 3.14
  2530. === Parsed with reviver2 and restringified :
  2531. undefined
  2532. ------ JSON test stringify: Number(NaN) ------
  2533. null
  2534. === Parsed with no reviver and restringified :
  2535. null
  2536. === Parsed with reviver2 and restringified :
  2537. null
  2538. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2539. null
  2540. === Parsed with no reviver and restringified :
  2541. null
  2542. === Parsed with reviver2 and restringified :
  2543. null
  2544. ------ JSON test stringify: bool(true) ------
  2545. true
  2546. === Parsed with no reviver and restringified :
  2547. true
  2548. === Parsed with reviver2 and restringified :
  2549. 99
  2550. ------ JSON test stringify: bool(false) ------
  2551. false
  2552. === Parsed with no reviver and restringified :
  2553. false
  2554. === Parsed with reviver2 and restringified :
  2555. false
  2556. ------ JSON test stringify: null ------
  2557. null
  2558. === Parsed with no reviver and restringified :
  2559. null
  2560. === Parsed with reviver2 and restringified :
  2561. null
  2562. ------ JSON test stringify: undefined ------
  2563. undefined
  2564. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2565. ------ JSON test stringify: Date(2008, 10, 10) ------
  2566. "2008-11-10T08:00:00.000Z"
  2567. === Parsed with no reviver and restringified :
  2568. "2008-11-10T08:00:00.000Z"
  2569. === Parsed with reviver2 and restringified :
  2570. "2008-11-10T08:00:00.000Z"
  2571. ------ JSON test stringify: string in Object ------
  2572. "hello"
  2573. === Parsed with no reviver and restringified :
  2574. "hello"
  2575. === Parsed with reviver2 and restringified :
  2576. "hello"
  2577. ------ JSON test stringify: number in Object ------
  2578. 33
  2579. === Parsed with no reviver and restringified :
  2580. 33
  2581. === Parsed with reviver2 and restringified :
  2582. 33
  2583. ------ JSON test stringify: bool in Object ------
  2584. true
  2585. === Parsed with no reviver and restringified :
  2586. true
  2587. === Parsed with reviver2 and restringified :
  2588. 99
  2589. ------ JSON test stringify: SimpleObject ------
  2590. {
  2591. "MemberNo1": "\"data\"",
  2592. "dateMember": "2008-04-01T07:00:00.000Z",
  2593. "nullMember": null,
  2594. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2595. }
  2596. === Parsed with no reviver and restringified :
  2597. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2598. === Parsed with reviver2 and restringified :
  2599. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2600. ------ JSON test stringify: Object with nested objects and array ------
  2601. {
  2602. "MemberNo1": "\"data\"",
  2603. "dateMember": "2008-04-01T07:00:00.000Z",
  2604. "nullMember": null,
  2605. "arr": [
  2606. "document.location",
  2607. "foolish"
  2608. ],
  2609. "nested": {
  2610. "nestedM1": {},
  2611. "nestedM2": 1234,
  2612. "nestedM3": {
  2613. "a": false,
  2614. "b": false
  2615. }
  2616. },
  2617. "a": {
  2618. "a": {
  2619. "a": false,
  2620. "b": false,
  2621. "c": 3.14
  2622. },
  2623. "nestedM2": 1234,
  2624. "b": {
  2625. "a": false,
  2626. "b": false,
  2627. "c": 3.14
  2628. }
  2629. },
  2630. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2631. }
  2632. === Parsed with no reviver and restringified :
  2633. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false,"c":3.14},"nestedM2":1234,"b":{"a":false,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2634. === Parsed with reviver2 and restringified :
  2635. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false},"nestedM2":1234,"b":{"a":false,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2636. ------ JSON test stringify: Simple array ------
  2637. [
  2638. "document.location",
  2639. "foolish"
  2640. ]
  2641. === Parsed with no reviver and restringified :
  2642. ["document.location","foolish"]
  2643. === Parsed with reviver2 and restringified :
  2644. ["document.location","foolish"]
  2645. ------ JSON test stringify: Complex array ------
  2646. [
  2647. "document.location",
  2648. "foolish",
  2649. 12.3,
  2650. "2008-10-09T07:00:00.000Z",
  2651. {},
  2652. null,
  2653. {
  2654. "intMember": 3,
  2655. "strMember": "string_member_in_object"
  2656. },
  2657. null,
  2658. null,
  2659. null,
  2660. [
  2661. "NestedArray_1stParamString",
  2662. 3.14,
  2663. {
  2664. "a": "nested object in array",
  2665. "c": true
  2666. },
  2667. null,
  2668. []
  2669. ],
  2670. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  2671. ]
  2672. === Parsed with no reviver and restringified :
  2673. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2674. === Parsed with reviver2 and restringified :
  2675. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2676. ------ JSON test stringify: complex string 2 ------
  2677. PASS
  2678. === Parsed with no reviver and restringified :
  2679. PASS
  2680. === Parsed with reviver2 and restringified :
  2681. PASS
  2682. *************************** JSON test stringify: replacer: replacer function, if the key is 'a' and the holder has a prop 'b', replace the value of the prop 'a' with the value of prop b space: number 24 ***********************
  2683. ------ JSON test stringify: String simple ------
  2684. "SampleTest"
  2685. === Parsed with no reviver and restringified :
  2686. "SampleTest"
  2687. === Parsed with reviver2 and restringified :
  2688. "SampleTest"
  2689. ------ JSON test stringify: Number(1) ------
  2690. 1
  2691. === Parsed with no reviver and restringified :
  2692. 1
  2693. === Parsed with reviver2 and restringified :
  2694. 99
  2695. ------ JSON test stringify: Number(1234) ------
  2696. 12345
  2697. === Parsed with no reviver and restringified :
  2698. 12345
  2699. === Parsed with reviver2 and restringified :
  2700. 12345
  2701. ------ JSON test stringify: Number(3.14) ------
  2702. 3.14
  2703. === Parsed with no reviver and restringified :
  2704. 3.14
  2705. === Parsed with reviver2 and restringified :
  2706. undefined
  2707. ------ JSON test stringify: Number(NaN) ------
  2708. null
  2709. === Parsed with no reviver and restringified :
  2710. null
  2711. === Parsed with reviver2 and restringified :
  2712. null
  2713. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2714. null
  2715. === Parsed with no reviver and restringified :
  2716. null
  2717. === Parsed with reviver2 and restringified :
  2718. null
  2719. ------ JSON test stringify: bool(true) ------
  2720. true
  2721. === Parsed with no reviver and restringified :
  2722. true
  2723. === Parsed with reviver2 and restringified :
  2724. 99
  2725. ------ JSON test stringify: bool(false) ------
  2726. false
  2727. === Parsed with no reviver and restringified :
  2728. false
  2729. === Parsed with reviver2 and restringified :
  2730. false
  2731. ------ JSON test stringify: null ------
  2732. null
  2733. === Parsed with no reviver and restringified :
  2734. null
  2735. === Parsed with reviver2 and restringified :
  2736. null
  2737. ------ JSON test stringify: undefined ------
  2738. undefined
  2739. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2740. ------ JSON test stringify: Date(2008, 10, 10) ------
  2741. "2008-11-10T08:00:00.000Z"
  2742. === Parsed with no reviver and restringified :
  2743. "2008-11-10T08:00:00.000Z"
  2744. === Parsed with reviver2 and restringified :
  2745. "2008-11-10T08:00:00.000Z"
  2746. ------ JSON test stringify: string in Object ------
  2747. "hello"
  2748. === Parsed with no reviver and restringified :
  2749. "hello"
  2750. === Parsed with reviver2 and restringified :
  2751. "hello"
  2752. ------ JSON test stringify: number in Object ------
  2753. 33
  2754. === Parsed with no reviver and restringified :
  2755. 33
  2756. === Parsed with reviver2 and restringified :
  2757. 33
  2758. ------ JSON test stringify: bool in Object ------
  2759. true
  2760. === Parsed with no reviver and restringified :
  2761. true
  2762. === Parsed with reviver2 and restringified :
  2763. 99
  2764. ------ JSON test stringify: SimpleObject ------
  2765. {
  2766. "MemberNo1": "\"data\"",
  2767. "dateMember": "2008-04-01T07:00:00.000Z",
  2768. "nullMember": null,
  2769. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2770. }
  2771. === Parsed with no reviver and restringified :
  2772. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2773. === Parsed with reviver2 and restringified :
  2774. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2775. ------ JSON test stringify: Object with nested objects and array ------
  2776. {
  2777. "MemberNo1": "\"data\"",
  2778. "dateMember": "2008-04-01T07:00:00.000Z",
  2779. "nullMember": null,
  2780. "arr": [
  2781. "document.location",
  2782. "foolish"
  2783. ],
  2784. "nested": {
  2785. "nestedM1": {},
  2786. "nestedM2": 1234,
  2787. "nestedM3": {
  2788. "a": false,
  2789. "b": false
  2790. }
  2791. },
  2792. "a": {
  2793. "a": {
  2794. "a": false,
  2795. "b": false,
  2796. "c": 3.14
  2797. },
  2798. "nestedM2": 1234,
  2799. "b": {
  2800. "a": false,
  2801. "b": false,
  2802. "c": 3.14
  2803. }
  2804. },
  2805. "stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2806. }
  2807. === Parsed with no reviver and restringified :
  2808. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false,"c":3.14},"nestedM2":1234,"b":{"a":false,"b":false,"c":3.14}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2809. === Parsed with reviver2 and restringified :
  2810. {"MemberNo1":"\"data\"","dateMember":"2008-04-01T07:00:00.000Z","nullMember":null,"arr":["document.location","foolish"],"nested":{"nestedM1":{},"nestedM2":1234,"nestedM3":{"a":false,"b":false}},"a":{"a":{"a":false,"b":false},"nestedM2":1234,"b":{"a":false,"b":false}},"stringmember":"this string ends the obj. You should not see functionMember and undefinedMember"}
  2811. ------ JSON test stringify: Simple array ------
  2812. [
  2813. "document.location",
  2814. "foolish"
  2815. ]
  2816. === Parsed with no reviver and restringified :
  2817. ["document.location","foolish"]
  2818. === Parsed with reviver2 and restringified :
  2819. ["document.location","foolish"]
  2820. ------ JSON test stringify: Complex array ------
  2821. [
  2822. "document.location",
  2823. "foolish",
  2824. 12.3,
  2825. "2008-10-09T07:00:00.000Z",
  2826. {},
  2827. null,
  2828. {
  2829. "intMember": 3,
  2830. "strMember": "string_member_in_object"
  2831. },
  2832. null,
  2833. null,
  2834. null,
  2835. [
  2836. "NestedArray_1stParamString",
  2837. 3.14,
  2838. {
  2839. "a": "nested object in array",
  2840. "c": true
  2841. },
  2842. null,
  2843. []
  2844. ],
  2845. "[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  2846. ]
  2847. === Parsed with no reviver and restringified :
  2848. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",3.14,{"a":"nested object in array","c":true},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2849. === Parsed with reviver2 and restringified :
  2850. ["document.location","foolish",12.3,"2008-10-09T07:00:00.000Z",{},null,{"intMember":3,"strMember":"string_member_in_object"},null,null,null,["NestedArray_1stParamString",null,{"a":"nested object in array","c":99},null,[]],"[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"]
  2851. ------ JSON test stringify: complex string 2 ------
  2852. PASS
  2853. === Parsed with no reviver and restringified :
  2854. PASS
  2855. === Parsed with reviver2 and restringified :
  2856. PASS
  2857. *************************** JSON test stringify: replacer: replacer function, if the key is 'a' and the holder has a prop 'b', replace the value of the prop 'a' with the value of prop b space: string : ........................ ***********************
  2858. ------ JSON test stringify: String simple ------
  2859. "SampleTest"
  2860. === Parsed with no reviver and restringified :
  2861. "SampleTest"
  2862. === Parsed with reviver2 and restringified :
  2863. "SampleTest"
  2864. ------ JSON test stringify: Number(1) ------
  2865. 1
  2866. === Parsed with no reviver and restringified :
  2867. 1
  2868. === Parsed with reviver2 and restringified :
  2869. 99
  2870. ------ JSON test stringify: Number(1234) ------
  2871. 12345
  2872. === Parsed with no reviver and restringified :
  2873. 12345
  2874. === Parsed with reviver2 and restringified :
  2875. 12345
  2876. ------ JSON test stringify: Number(3.14) ------
  2877. 3.14
  2878. === Parsed with no reviver and restringified :
  2879. 3.14
  2880. === Parsed with reviver2 and restringified :
  2881. undefined
  2882. ------ JSON test stringify: Number(NaN) ------
  2883. null
  2884. === Parsed with no reviver and restringified :
  2885. null
  2886. === Parsed with reviver2 and restringified :
  2887. null
  2888. ------ JSON test stringify: Number(POSITIVE_INFINITY) ------
  2889. null
  2890. === Parsed with no reviver and restringified :
  2891. null
  2892. === Parsed with reviver2 and restringified :
  2893. null
  2894. ------ JSON test stringify: bool(true) ------
  2895. true
  2896. === Parsed with no reviver and restringified :
  2897. true
  2898. === Parsed with reviver2 and restringified :
  2899. 99
  2900. ------ JSON test stringify: bool(false) ------
  2901. false
  2902. === Parsed with no reviver and restringified :
  2903. false
  2904. === Parsed with reviver2 and restringified :
  2905. false
  2906. ------ JSON test stringify: null ------
  2907. null
  2908. === Parsed with no reviver and restringified :
  2909. null
  2910. === Parsed with reviver2 and restringified :
  2911. null
  2912. ------ JSON test stringify: undefined ------
  2913. undefined
  2914. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:1
  2915. ------ JSON test stringify: Date(2008, 10, 10) ------
  2916. "2008-11-10T08:00:00.000Z"
  2917. === Parsed with no reviver and restringified :
  2918. "2008-11-10T08:00:00.000Z"
  2919. === Parsed with reviver2 and restringified :
  2920. "2008-11-10T08:00:00.000Z"
  2921. ------ JSON test stringify: string in Object ------
  2922. "hello"
  2923. === Parsed with no reviver and restringified :
  2924. "hello"
  2925. === Parsed with reviver2 and restringified :
  2926. "hello"
  2927. ------ JSON test stringify: number in Object ------
  2928. 33
  2929. === Parsed with no reviver and restringified :
  2930. 33
  2931. === Parsed with reviver2 and restringified :
  2932. 33
  2933. ------ JSON test stringify: bool in Object ------
  2934. true
  2935. === Parsed with no reviver and restringified :
  2936. true
  2937. === Parsed with reviver2 and restringified :
  2938. 99
  2939. ------ JSON test stringify: SimpleObject ------
  2940. {
  2941. .........."MemberNo1": "\"data\"",
  2942. .........."dateMember": "2008-04-01T07:00:00.000Z",
  2943. .........."nullMember": null,
  2944. .........."stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2945. }
  2946. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2947. ------ JSON test stringify: Object with nested objects and array ------
  2948. {
  2949. .........."MemberNo1": "\"data\"",
  2950. .........."dateMember": "2008-04-01T07:00:00.000Z",
  2951. .........."nullMember": null,
  2952. .........."arr": [
  2953. ...................."document.location",
  2954. ...................."foolish"
  2955. ..........],
  2956. .........."nested": {
  2957. ...................."nestedM1": {},
  2958. ...................."nestedM2": 1234,
  2959. ...................."nestedM3": {
  2960. .............................."a": false,
  2961. .............................."b": false
  2962. ....................}
  2963. ..........},
  2964. .........."a": {
  2965. ...................."a": {
  2966. .............................."a": false,
  2967. .............................."b": false,
  2968. .............................."c": 3.14
  2969. ....................},
  2970. ...................."nestedM2": 1234,
  2971. ...................."b": {
  2972. .............................."a": false,
  2973. .............................."b": false,
  2974. .............................."c": 3.14
  2975. ....................}
  2976. ..........},
  2977. .........."stringmember": "this string ends the obj. You should not see functionMember and undefinedMember"
  2978. }
  2979. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2980. ------ JSON test stringify: Simple array ------
  2981. [
  2982. .........."document.location",
  2983. .........."foolish"
  2984. ]
  2985. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  2986. ------ JSON test stringify: Complex array ------
  2987. [
  2988. .........."document.location",
  2989. .........."foolish",
  2990. ..........12.3,
  2991. .........."2008-10-09T07:00:00.000Z",
  2992. ..........{},
  2993. ..........null,
  2994. ..........{
  2995. ...................."intMember": 3,
  2996. ...................."strMember": "string_member_in_object"
  2997. ..........},
  2998. ..........null,
  2999. ..........null,
  3000. ..........null,
  3001. ..........[
  3002. ...................."NestedArray_1stParamString",
  3003. ....................3.14,
  3004. ....................{
  3005. .............................."a": "nested object in array",
  3006. .............................."c": true
  3007. ....................},
  3008. ....................null,
  3009. ....................[]
  3010. ..........],
  3011. .........."[0]-document.location, [1]-string, [2]-number, [3]-date, [4]-empty obj, [5]-missing, [6]-obj, [7]-null, [8]-undef, [9]-function, [10]-nestedArray, [11]-this"
  3012. ]
  3013. !!Exception: SyntaxError: JSON.parse Error: Invalid character at position:3
  3014. ------ JSON test stringify: complex string 2 ------
  3015. PASS
  3016. === Parsed with no reviver and restringified :
  3017. PASS
  3018. === Parsed with reviver2 and restringified :
  3019. PASS