[x3d-public] JSON status
John Carlson
yottzumm at gmail.com
Sun Oct 5 08:51:10 PDT 2025
I see a mistake. I don’t mean .x3dj files are shaders, but I don’t know if
that’s ruled out in castle. I’m more referring to ExternProto for .x3dj,
and also images (in the past) need “castle-data://“ in the URL to refer to
the local data folder.
Sorry for the confusion!
John
On Sun, Oct 5, 2025 at 10:44 AM John Carlson <yottzumm at gmail.com> wrote:
> Sure, Michalis,
>
> What I’m referring to is the urls in jsonmodelviewer used to (still?)
> require a “castle-data://“ prefix in order to be found. I am not referring
> to the castle model viewer.
>
> Sorry for not being plainer. Perhaps the recent work on https has gotten
> rid of this requirement?
>
> A special flag in a X3dToJson.xslt (or a new X3dToCastleJson.xslt) might
> indicate use of “castle-data://“ prefixes in .x3dj files, but only when
> targeting jsonmodelviewer.
>
> Again, I’m not sure if special urls are still a requirement, given recent
> work on https in castle, and they were probably never a requirement for
> castle model viewer.
>
> This is good information if you are making a Pascal game which includes
> .x3dj urls (like shaders), but unnecessary if you are using Castle Model
> Viewer. Inlining is still an option.
>
> Further details are welcome!
>
> John
>
> On Sun, Oct 5, 2025 at 9:09 AM Michalis Kamburelis <
> michalis.kambi at gmail.com> wrote:
>
>>
>>
>> Note: I'm not sure what you mean by "Note that Castle, in the past,
>> has had special URLs, indicating a X3dToCastle.xslt or special flags
>> to add Castlisms." :) We don't have anything X3dToCastle.xslt , and
>> I'm not sure what special flags you mean.
>>
>> Regards,
>> Michalis
>>
>> sob., 4 paź 2025 o 23:46 John Carlson <yottzumm at gmail.com> napisał(a):
>> >
>> > Read through some of this as well,
>> > https://www.web3d.org/x3d/stylesheets/X3dToJson.html
>> >
>> > Note that in addition to X3DOM and X_ITE, there is also a prototype
>> JSON .x3dj loader (JSON to DOM to XML) for Castle:
>> > https://github.com/coderextreme/jsonmodelviewer/
>> >
>> > But typically, a Pascal programmer would leverage this on their
>> project, it’s not in the main model viewer yet that I know of. Note that
>> Castle, in the past, has had special URLs, indicating a X3dToCastle.xslt or
>> special flags to add Castlisms. But I think this is unnecessary for the
>> base model viewer.
>> >
>> > Further work would involve direct JSON to scenegraph conversion (first
>> attempt failed).
>> >
>> > John
>> >
>> > On Sat, Oct 4, 2025 at 3:52 PM John Carlson <yottzumm at gmail.com> wrote:
>> >>
>> >>
>> >>
>> >> On Sat, Oct 4, 2025 at 3:22 PM Don Brutzman via x3d-public <
>> x3d-public at web3d.org>If progress continues as planned, we should be able
>> to have a draft XML DTD/Schema (and hopefully JSON Schema too) in the
>> spring in order to start building, validating, and evaluating models with
>> such new features.
>> >>
>> >> Don:
>> >>
>> >> Any time you want help with validating JSON documents, let me know.
>> I can always rev-up my x3droundtrip project as well!
>> >>
>> >> I also note that jsonlint provides schema validation that I apparently
>> missed!
>> >>
>> >> Here’s a version which supports
>> >> draft JSON Schema 2020-12:
>> >>
>> >> https://www.npmjs.com/package/@prantlf/jsonlint
>> >>
>> >> If you can work with uncertainties in npm (check package.json and
>> package-lock.json dependencies and pinned versions, make sure you’re not
>> running postinstall scripts). Note that npm already checks for
>> vulnerabilities. And if you have GitHub, it also checks for issues in the
>> package*.json files.
>> >>
>> >> I have not seen these features in ant, maven or gradle, but I have
>> seen that maven repositories do report vulnerabilities.
>> >>
>> >> One issue I haven’t resolved is choosing emoji’s versus X3D URNs in
>> url fields. It’s a matter of iri-reference verses uri-reference in the
>> format properties in the schema.
>> >>
>> >> Note that I think you’ll probably find many issues with MFNode vs
>> SFNode in X3dToJson.xslt which I haven’t reported. Most of my XML to JSON
>> conversions have migrated to Holger’s x3d-tidy.
>> >>
>> >> John
>> >>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20251005/71a1ad59/attachment.html>
More information about the x3d-public
mailing list