<div dir="auto">I am fairly sure that JSON schema does not have inheritance, thus the need to share definitions.   In other words, interface nodes at the interface level are are not defined.    I agree that looking at interfaces would be a good way to find shared fields.</div><div dir="auto"><br></div><div dir="auto">I’m just not sure which of my X3DUOM parsers ignore abstract types, and whether abstract types are ignored in field types.  I do think abstract types are required for fields.   I think that there are 2 composite types for JSON, object and array.   This goes for JSON schema as well.   I learned most about JSON schema by reading Roy’s schema, however.</div><div dir="auto"><br></div><div dir="auto">The whole beauty of JSON is that it takes data structures to the core and only offers objects, arrays and primitives.   In some ways, it resembles Scheme, Lisp and DOM.</div><div dir="auto">Yes, I agree that typesafety is good.   Extensibility and flexibility are good too.   There are two levels, parsing and semantics.   We want easy to parse structures for both machines and humans.   Then we layer semantics and validation above that.</div><div dir="auto"><br></div><div dir="auto">I don’t want to copy Charles Petzold’s CSAML. Operations or behavior are better defined another way.  I think that is one reason why I brought up specification languages (there’s one that’s an ISO standard).</div><div dir="auto"><br></div><div dir="auto">Animation fits nicely between the two, you can have declarative or behavioral (might save space) animation.   I think moving behavioral animation into declarative animation is a good thing.</div><div dir="auto"><br></div><div dir="auto">Most of my current animation is behavioral, and I welcome discussions on how to make it declarative (that’s why I am here, I think).   My guess is that it may fit best in a particle system.  In the real world, it probably fits best with a self-driving car...how do we animate that declaratively?</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 5, 2021 at 1:37 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">I am not really sure how to parse X3DUOM without a “do it all at once” mindset.   The point is, we now want to work on reuse.</div><div dir="auto"><br></div><div dir="auto">The big question is, when field names are reused, do they have the same type?  For @rotation, there were different types.</div><div dir="auto"><br></div><div dir="auto">It will be important to keep track of definitions so they can be rereferenced.</div><div dir="auto"><br></div><div dir="auto">I agree we should design the schema before mass producing them.   I attempted to follow Roy’s lead, but fell down when it came to reuse in some cases.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 5, 2021 at 12:31 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">John, compression is likely useless because we can't develop a schema if it is encoded in binary.<br>
<br>
The key to making such a schema smaller lies in whether JSON Schema is object oriented or not.<br>
<br>
If object oriented, then all of the shared strongly typed field information doesn't have to appear multiple times.<br>
<br>
X3DUOM includes the entire X3D inheritance hierarchy so this can be automated.<br>
<br>
After searching I think the descriptions you seek can be found at (of all places) the JSON schema documentation:<br>
<br>
* Understanding JSON Schema 7.0, Structuring a complex schema<br>
   <a href="https://json-schema.org/understanding-json-schema/structuring.html#structuring-a-complex-schema" rel="noreferrer" target="_blank">https://json-schema.org/understanding-json-schema/structuring.html#structuring-a-complex-schema</a><br>
<br>
Again the key here is to not perform brute-force heroics on a gigantic schema by hand.<br>
<br>
Instead make a series of JSON schemas of gradually increasing expressive power that validate something extremely simple, like HelloTriangle.json or Hello World.json models.<br>
<br>
* X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 01 Technical Overview, Hello Triangle<br>
   <a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangleIndex.html" rel="noreferrer" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangleIndex.html</a><br>
   <a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangle.json" rel="noreferrer" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangle.json</a><br>
   <a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangle.x3d" rel="noreferrer" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloTriangle.x3d</a><br>
<br>
On 4/3/2021 10:56 PM, John Carlson wrote:<br>
> <br>
> I think we can make some effort to reduce the size of the X3D JSON<br>
> auto-generated schema (especially 4.0).  There is a lot of duplicated<br>
> stuff there, I think.<br>
> <br>
> We can look to Roy's schema for inspiration, likely.<br>
> <br>
> es6x3d/x3d.js grew by an order of magnitude just by sitting there.  I<br>
> think it's too big now.<br>
> <br>
> Is there an optimizer person available?<br>
> <br>
> Thanks!<br>
> <br>
> John<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div></div>
</blockquote></div></div>