[x3d-public] analysis of a WIP...X3DJSAIL XML/JSON output not there yet

John Carlson yottzumm at gmail.com
Wed Sep 15 23:37:28 PDT 2021


Note, I'm not sure how much I've checked in.  Let me know if you want to 
work on this, and I'll create a branch.

John

On 9/16/21 1:16 AM, John Carlson wrote:
> Where did the IS go in the Java generated JSON code for fieldValue?
>
> I did remove "IS" as a substatement of fieldValue, in X3DUDOM. AFAIK, 
> this was not checked in.   This removed IS removes setIS, but Don did 
> something to add setIS() method back.   What I see in the X3DJSAIL 
> code is  failure to adequately output IS in XML or JSON.  I'm not 
> quite sure what to do, maybe check next email.
>
> Path to file: 
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/rubik2x2x2.new.json
>
> comparing JSON to repository:
>
> +++ b/src/main/data/rubik2x2x2.new.json
> @@ -28,7 +28,7 @@
>            },
>            {
>              "@name":"translated",
> -            "@content":"13 September 2021"
> +            "@content":"16 September 2021"
>            },
>            {
>              "@name":"generator",
> @@ -161,15 +161,7 @@
>                                    "@value":[0,0,0]
>                                  },
>                                  {
> -                                  "@name":"diffuseColor",
> -                                  "IS": {
> -                                      "connect": [
> -                                        {
> - "@nodeField":"diffuseColor",
> - "@protoField":"diffuseColor"
> -                                        }
> -                                      ]
> -                                  }
> +                                  "@name":"diffuseColor"
>                                  }
>                                ]
>                              }
> @@ -183,15 +175,7 @@
>                                    "@value":[2,0,0]
>                                  },
>                                  {
> -                                  "@name":"diffuseColor",
> -                                  "IS": {
> -                                      "connect": [
> -                                        {
> - "@nodeField":"diffuseColor",
> - "@protoField":"diffuseColor"
> -                                        }
> -                                      ]
> -                                  }
> +                                  "@name":"diffuseColor"
>                                  }
>                                ]
>                              }
> @@ -250,15 +234,7 @@
>                                    "@value":[0,0,0]
>                                  },
>                                  {
> -                                  "@name":"diffuseColor",
> :
> =================================
>
> If you assume that this is merely a JSON problem, look at 
> python-X3DJSAIL rubik2x2x2.new.x3d output: 
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/rubik2x2x2.new.x3d
>
>
>       <ProtoBody>
>         <Transform>
>           <IS>
>             <connect nodeField='translation' protoField='ztranslation'/>
>           </IS>
>           <ProtoInstance name='two'>
>             <fieldValue name='ytranslation' value='0 0 0'/>
>             <fieldValue name='diffuseColor'/>
>           </ProtoInstance>
>           <ProtoInstance name='two'>
>             <fieldValue name='ytranslation' value='0 2 0'/>
>             <fieldValue name='diffuseColor'/>
>           </ProtoInstance>
>         </Transform>
>       </ProtoBody>
>
>
> At this point, I am tempted to add an IS field to to fieldValue in 
> X3DUOM, but i know it gets overwritten.
>
> Original file is here:
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/rubik2x2x2.x3d 
>
>
>
> John
>



More information about the x3d-public mailing list