Export json data

Wed 8. Mar 2017, 18:41

Hello! I'm the lead designer of a serious game which is already several years old. Our data is all stored & loaded via json.

I'm looking at articy:draft as a possible "pretty front-end" for editing our data. I do most of the data editing & development, so this is mostly to help my own work. ;)

Ideally, I could construct a project with specific export settings that would produce data EXACTLY like the data files we already have. That is the goal.
That means I want to export absolutely no articy-specific data. No templates, flows, properties, or anything else. I just want data.

BUT - thus far (and I've only tried for a day or so) when trying to export a single data object, I can't manage to export less than 700 lines of data - mostly blank folders.

I really thought I could turn off everything in the "Data Layout" and select just a single object in "Packages" and get what I want. Is this not possible? Are there more configuration options someone can point me to? Your help is appreciated.
Mr_Strange
 
Posts: 2
Joined: Fri 3. Mar 2017, 00:20

Re: Export json data

Thu 9. Mar 2017, 15:34

Hi Mr_Strange,

it is true that our export formats are not 100% configurable, the normal XML export is that for a reason and the newer ruleset exports like the JSON export are configurable to a certain degree but still "dictate" a certain format.
While its not possible(yet) to disable certain "main" nodes (Settings, Project, GlobalVariables etc) in the json you could just delete those or write a simple tool that deletes those unecessary nodes after export. The "Packages" node is what you are after, as it contains only the project data. But I see what i can do to add this option in a potential update in the future.

If you really need the exported data to be in a very specific format, you could write a custom plugin for articy:draft using our MDK, effectively bypassing our exports and writing one yourself via a plugin. But this is only feasible if you have programming experience and ofc time to do that.

Sorry for not giving you a better answer let me know if you need anything else

Best regards

Nico
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Re: Export json data

Mon 13. Mar 2017, 19:36

Thanks for the reply! I have a couple followups, so that we can be certain we're both talking about the same thing:

1 - Deleting / Excluding the "main" nodes. This would be very nice for me. I can do it manually, as you point out. Helps if all of this is in a predictable chunk at the start of the file.

2 - Dealing with "empty" nodes. This is my bigger complaint. I've manually turned off EVERYTHING in my export dialog. And yet I still get dozens and dozens of these entries in my export:

{
"Id": "0x300000030635118",
"TechnicalName": "",
"Type": "TemplateTypeFolder"
},

These are just empty folders. So we're exporting the fact that there is an empty folder there - but wasn't that exactly what I chose to disable in the "Folders" export option? I want a clean way to simply export nothing when there is an empty folder, or empty anything.

3 - Included templates restricting the export of data. The data I want to export is defined in a template or templates. I like templates because they enhance my workflow. But why must I export the template data (which I don't want) in order to export my data?

I think I can summarize everything this way: You have added a way to export the articy: draft project, and allow it to be loaded / imported elsewhere. Awesome. But in addition to that, I want a data-only export style, which I can use to feed my games. I want to have NONE of the project-specific data, templates, or formatting. Just export my data.
Mr_Strange
 
Posts: 2
Joined: Fri 3. Mar 2017, 00:20

Re: Export json data

Tue 14. Mar 2017, 10:26

Hi Mr_Strange,

1 - Deleting / Excluding the "main" nodes. This would be very nice for me. I can do it manually, as you point out. Helps if all of this is in a predictable chunk at the start of the file.


Yes the format is always strict, in regards to the "main" nodes and even always in a very specific order:
  • Settings
  • Project
  • Global Variables
  • Packages
  • ScriptMethods
  • Hierarchy

2 - Dealing with "empty" nodes. This is my bigger complaint. I've manually turned off EVERYTHING in my export dialog. And yet I still get dozens and dozens of these entries in my export:


This is correct, but what you are seeing is the Hierarchy node. This is a sort of meta node. This node contains your complete project structure in a condensed form as it only carries Id, TechnicalName and Type and nothing else. We added that main node if people want to create something like a treeview control for their engine/tools or needed that kind of information for error detection, because the Hierarchy contains all objects, no matter what you set in the data layout. You could use that for cross referencing for example like "Its in the hierarchy, but not in the object data".

When you look into the Packages node, you will find all your actual data, sorted into Packages, set by your Ruleset. And here are your filtered objects that you selected via DataLayout with exactly the set properties. So in your usecase you are probably fine by ignoring everything and only use that Packages node.

I think I can summarize everything this way: You have added a way to export the articy: draft project, and allow it to be loaded / imported elsewhere. Awesome. But in addition to that, I want a data-only export style, which I can use to feed my games. I want to have NONE of the project-specific data, templates, or formatting. Just export my data.


Arguably the export is more verbose than necessary, but the reasoning here was that it is meant as an intermediate format: "Pick what you need and put it in the format you need". It is quiet difficult to create a format that suits everyone, so we thought an intermediate format is the safer way to go. Ofc we have that already in the old XML export, but that was very difficult to read (for humans), weird to parse(jumping from id to id) and contains everything; all data no exceptions. The new ruleset exports are more of a middle ground. But i can understand the desire to have a format to use directly, thats why i think its a good idea to add the option to exclude certain main nodes for the regular json export.

I hope i cleared everything up and if you have any more question, let me know!

Best regards

Nico
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

Who We Are
Contact Us
Social Links