Author Topic: XML or JSON?  (Read 1987 times)

HSE

  • Member
  • *****
  • Posts: 2362
  • AMD 7-32 / i3 10-64
XML or JSON?
« on: January 07, 2021, 05:44:07 AM »
Hi all!

I'm thinking something to manage bibliography in a non lineal way, perhaps some kind of tree.
The idea is a full catalogue lineal, but referenced in secundary catalogues by subjects, subsubjects, etc.
I don't know if there is an standard for that kind of trees.

A lot of years ago I could think that XML is most reasonably format to store that data, but now I see a lot of interest in JSON. Question then is: What could be better?

Thanks in advance. HSE
Equations in Assembly: SmplMath

DebugBSD

  • Regular Member
  • *
  • Posts: 40
Re: XML or JSON?
« Reply #1 on: January 07, 2021, 06:02:56 AM »
Hi all!

I'm thinking something to manage bibliography in a non lineal way, perhaps some kind of tree.
The idea is a full catalogue lineal, but referenced in secundary catalogues by subjects, subsubjects, etc.
I don't know if there is an standard for that kind of trees.

A lot of years ago I could think that XML is most reasonably format to store that data, but now I see a lot of interest in JSON. Question then is: What could be better?

Thanks in advance. HSE

Hi,

In my opinion, I should go to Json because it's more easy to parse or at least I find it more easy to parse. With a tree data structure you can parse a file in one pass. The problem I see with XML is the opening and closing tags. That thing is not needed with JSON because all groups are closed with a single } instead of using /> or other thing. Furthermore, there are a lot of articles on the internet where to learn the syntax which it's so easy. (https://www.w3schools.com/js/js_json_syntax.asp

That's my opinion
Happy Hacking!

Biterider

  • Member
  • *****
  • Posts: 1076
  • ObjAsm Developer
    • ObjAsm
Re: XML or JSON?
« Reply #2 on: January 07, 2021, 08:37:14 AM »
Hi HSE
If you have a choice, my vote will definitely go to JSON.
It is simple and easy to read, which results in a faster encoding and parsing process. This is important when you have a lot of data.
Maybe it's hype, but you have JSON support on many other platforms and languages.

Biterider



Adamanteus

  • Member
  • **
  • Posts: 249
    • LLC "AMS"
Re: XML or JSON?
« Reply #3 on: January 07, 2021, 11:10:25 AM »
 Non lineal structures is very difficult to save in DB, as and use as DB for it lightweight data-interchange format, could it do only most complex formats. So, for such cases, graphs could be saved by edges (nodes is record ids) in standalone DB  :eusa_boohoo:
« Last Edit: January 07, 2021, 01:54:58 PM by Adamanteus »

HSE

  • Member
  • *****
  • Posts: 2362
  • AMD 7-32 / i3 10-64
Re: XML or JSON?
« Reply #4 on: January 07, 2021, 11:04:01 PM »
Non lineal structures is very difficult to save in DB
Yes, I used a little SQLite for more standard DB, but is not for this.

JSON 2 - XML 0 until now  :biggrin:

I think, I will try to make the complete list JSON compatible with BibTex format  :rolleyes:

Thanks very much. HSE
Equations in Assembly: SmplMath