Notifications
Clear all

[Closed] JSON and maxscript?

 eek

Has anyone used JSON with maxscript – i.e building there own importer/exporter or using a .net library?

Any suggestions of libraries etc?

10 Replies

I haven’t used it in maxscript specifically, but JSON.NET is a good library:
http://json.codeplex.com/

 eek

Awesome! I will take a look, Im in python land currently which has a JSON module – I’ll dig into the .net assembly or python max stuff.

Hey Charles, i was looking at this about a month ago. I found I was confused as to what extra it offered over code serialized as XML, unless I’m missing something important. Any insight as to the advantages?

 eek

Well i pretty much use max, maya, motionbuilder and am evaluating shotgun at work – three of which use python.

Shotgun uses the dictionary key/value pair assignments to store all its data – this makes it incredibly easy to store, update etc… There methodology is CRUD with some additional methods: find, upload etc… Assignment and reference is handled quite nicely:

{‘type’:‘shot’, ‘id’:2, ‘project’:{‘type’:‘project’, ‘id’:1}}

type = type of information
id = the informations id
data = data of the information, which can reference additional asses eg.
data = {‘name’:‘charles’, ‘scene’:{‘type’:‘scene’, ‘id’:2}}

Im just looking into humanly readable formats that are easy to update by hand or not, and are cross compatible.

bumping this thread because the challenge of updating JSON via MAX script is my next priority.

eek, did you get the JSON.NET library working ? If so I’d love to see some examples of loading/parsing/saving json, as I’m new to dot net objects in max script.

[EDIT]
I decided to edit down my spam to keep this thread concise.

[EDIT]
I decided to edit down my spam to keep this thread concise.

[EDIT]
I decided to edit down my spam to keep this thread concise.

[edit: deleting spam to minimize thread]

actually making some headway with this. I will post updated code when I am no longer on a deadline.

Page 1 / 2