News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

XML or JSON?

Started by HSE, January 07, 2021, 05:44:07 AM

Previous topic - Next topic

HSE

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

Quote from: HSE 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

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

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

#3
 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:

HSE

Quote from: Adamanteus on January 07, 2021, 11:10:25 AM
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