Hi Folks, Consider the bk: namespace prefix in this XML snippet:
<bk:Title>The Adventures of Huckleberry Finn</bk:Title> How would you convert that XML to JSON? Would you create this JSON:
"bk:Title":
"The Adventures of Huckleberry Finn" I will argue against doing that. The bk: prefix has meaning to XML parsers and XML applications, but it has no meaning to JSON parsers or JSON applications. In fact, the whole notion of namespaces is foreign to JSON. Emulating XML with JSON is a bad idea. When converting XML to JSON I recommend dropping (deleting) all namespace prefixes. Further, drop/delete all namespace declarations. Thus, convert the above XML to this JSON: "Title":
"The Adventures of Huckleberry Finn" If it is necessary to indicate that the Title is a book title, then create this JSON:
"Book Title":
"The Adventures of Huckleberry Finn" I invite your thoughts on this issue. /Roger |