cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Find the next step in your career as a Graphisoft Certified BIM Manager!

Wishes
Post your wishes about Graphisoft products: Archicad, BIMx, BIMcloud, and DDScad.

Add JSON File Format Support

Nader Belal
Mentor

Hello everyone & Graphisoft,

 

I would like to request from Graphisoft developer team to add support for JSON file type for every aspect that XML files do provide to Archicad, including GDL I/O.

I know that I have used few words, but my request is not trivial, besides:

  1. XML is quiet verbose (and big in size).
  2. Parsing XML file can sometimes prove to be problematic.
  3. Almost all database do support JSON file formats.

 

Thank you in advance

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
9 REPLIES 9
Francois_MCD
Expert

This sounds like a valid request for this compatibility feature @Nader Belal 
With the growing number of web apps & integrations for BIM data use, the compatibility JSON makes a lot of sense.

 

Regards
Francois Swanepoel
Everything happens in Archicad since v6.5 (2000) ‌
Hiking, Motorbiking, Good food, Gr8! Beer & excellent conversation 😉
#MadeByDyslexia is my unfair advantage – expect curious ideas, creative big thinking & small typos.
<> www.fusionBIM.co.za <> www.Scirrus.co <> www.BIM2fusedVR.com <> (new) Anatomy of Archicad Course
stefan
Expert

When you use XML to import data into your model, there can probably be more sanity checks implemented, since the XML is validated against an XSD. Think about importing configurations, attributes, classifications.

 

I fear that such validation may be less severe and more prone to errors with JSON. I may be wrong and I know that my colleagues in DEV typically use JSON for almost anything. 

 

Any idea what the risks would be? Higher chance of corrupting the Archicad project file?

--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad27/Revit2023/Rhino8/Unity/Solibri/Zoom
MBP2023:14"M2MAX/Sonoma+Win11
Archicad-user since 1998
my Archicad Book

I don't know enough neither to give you the answer that you seek, nor do I know enough about XSD.

But I do see a trend that have already been set and it's just a matter of time that it takes up momentum to anything and everything that surrounds DEV.

Besides, if we would go the lazy route, developers may parse back and forth from XML to JSON.

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

JSON  files have a validation Schema similar to XSD.  Most agree it is easier to use and understand. My opinion is that ( with the JSON Schema file) you can have as much control (constraint) or not, over your data validation as you like. A fast overview of the JSON Schema is on YouTube

JSON Schema Overview 

 

That is a overview only. Not all of the options are explained.

There are other videos on YouTube which describe the format and attributes of the Schema format file.

IMNOHO -- The JSON schema is more versatile and powerful than XSD. In fact, a JSON schema is used and required to validate the data interface between the Python API and the C++ API when using the CommandHandler function(s). Graphisoft has said, in the past, that they may move to the JSON format and Schema for other uses in future -- But don't count on it.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Thanks for this valuable insight Gerry.

This is most helpful for us that are interested in creating web based outputs & integrations for our projects but have no working knowledge on how to get there without help from skilled pros like you.

Regards
Francois Swanepoel
Everything happens in Archicad since v6.5 (2000) ‌
Hiking, Motorbiking, Good food, Gr8! Beer & excellent conversation 😉
#MadeByDyslexia is my unfair advantage – expect curious ideas, creative big thinking & small typos.
<> www.fusionBIM.co.za <> www.Scirrus.co <> www.BIM2fusedVR.com <> (new) Anatomy of Archicad Course
Abraham Smith
Booster

I would venture to say, without being very knowledgeable in depth about the GDL language or Json, I have been testing ChatGPT-3 trying to get it to at least give me an example of a raw line of code or NURBS forms in GDL language and no I have achieved it, since sometimes it gives me results in Json. Another thing that can be interesting is to open a window and help yourself with artificial intelligence (for those who are learning to program). 

 

Regards


Captura de Pantalla 2023-01-09 a la(s) 21.38.02.png
BIM Manager
bouhmidage
Advisor

+ 1 for this, 

 

I was dealing with classification xml files, it's a nightmare, until you learn coding on python or c# , to manage big xmls, and use them as databases for external apps, or even manage archicad attributes, 

 

 

AMD Ryzen 9 3900X, 32 GB RAM, RTX 3080 10 GB
Archicad 25
Windows 10 professional
https://www.behance.net/Nuance-Architects
scottjm
Expert

From a python point of view, parsing export files like attributes etc to iterate through them is very clunky from an XML file. JSON files are much easier to handle and reference individual tree element. 

Excel PowerQuery can also natively handle JSON files and it is possible (through some hair tearing out) to transpose JSON data into row and column formats. I believe XML requires a custom XSD to do the same thing. 

XML is dead. Long live JSON!

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe
stefan
Expert

XML is far from dead, especially since it has wide support in almost every programming language. I’ve created Python scripts to parse an Excel and turn it into an Archicad classification file in XML. Converting the script to export into JSON wouldn’t be that different though.

 

But I agree that json dumping and reading into files or strings is pretty flexible.

 

IDS and BCF use XML schemas. SVG, Collada, Word and Excel use XML.  Not really dead. 

--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad27/Revit2023/Rhino8/Unity/Solibri/Zoom
MBP2023:14"M2MAX/Sonoma+Win11
Archicad-user since 1998
my Archicad Book