Does XML Convert to JSON in an Unambiguous Way?

Chilkat does not provide functionality for XML-to-JSON conversion (or the reverse) because XML does not convert to JSON in an unambiguous way. XML and JSON have different structural and data modeling principles, leading to potential challenges and ambiguities during the conversion process. Some factors that contribute to the potential ambiguities are: Hierarchical vs. Flat Structure: XML supports deeply nested hierarchical […]

Classic ASP to Read JSON Request Body and Write JSON Response

Here’s a Classic ASP example using Chilkat to read an incoming JSON request body (such as from a POST), load it into a Chilkat JsonObject, and then write the JSON to an application/json response: <% If Request.TotalBytes > 0 Then ‘ Read the JSON request body into a Chilkat BinData object. set bd = Server.CreateObject(“Chilkat_9_5_0.BinData”) bd.AppendBinary(Request.BinaryRead(Request.TotalBytes)) ‘ Load a Chilkat […]

Case-Insensitive JSON

Question: How can JSON be processed in a case-insensitive manner? Rant followed by Answer:  JSON is intended to be case-sensitive.  XML is the same.  Similar to Java, C, C++, etc.  Names are case-sensitive.   Except, of course, there are knuckleheads out there that don’t understand the fundamental specifications and as a result introduce complexity into systems that should never have existed.  […]

Working with Huge (Extremely Large) JSON Files

Question: I am using the following calls in Visual FoxPro with Chilkat_9_5_0.JsonObject (9.5.0.80) and the resulting JSON is writing only {} oChilkatJson=Createobject(‘Chilkat_9_5_0.JsonObject’) oChilkatJson.LoadFile(“pathToLargeJSONFile”) oChilkatJson.EmitCompact=1 =STRTOFILE(oChilkatJson.Emit(),pathToOutputFile) Original Size of JSON: 259 MB (271,982,395 bytes) New JSON outputs as: {} I could use the https://www.example-code.com/foxpro/create_complex_json.asp​ to read and write each JSON property/object to memory and perform the one EMIT() a the end, I would think it would […]