Using JSON or XML as class template
(Automatically adding template at the end of the page.)
(Adding message template to the top of the page)
Line 1: Line 1:
{{message|Write the content here to display this box}}
You can use an existing JSON or XML snippet as a template to create a model section you can import into.
You can use an existing JSON or XML snippet as a template to create a model section you can import into.



Revision as of 22:39, 16 June 2024

Write the content here to display this box

You can use an existing JSON or XML snippet as a template to create a model section you can import into.

Using the default model and the Class detail, have the following JSON snippet in the clipboard:

 <root>
  <person id='1'>
    <name>Alan</name>
    <url>http://www.google.com</url>
  </person>
  <person id='2'>
    <name>Louis</name>
    <url>http://www.yahoo.com</url>
  </person>
 </root>

Right-click the class you want to use as a root for your import using, for example, Tajson, and select "Add attributes, assoc. and classes from clipboard json or xml" - see below:

2022-03-31 19h34 36 Create model from Json.png

This will add Root1 and Person1 classes to your model like this:

Created model from JSON.png

After this, you can use JSonToObjects or Tajson to create objects from your JSON or XML.

This page was edited 95 days ago on 06/17/2024. What links here