schema-guru icon indicating copy to clipboard operation
schema-guru copied to clipboard

Consider a way to handle nested objects

Open coderextreme opened this issue 10 years ago • 6 comments

Here's a sample JSON file http://coderextreme.net/SeaStarGroup.json [here's the license for this file: http://x3dgraphics.com/examples/X3dForWebAuthors/license.html ]. I will download schema-guru try this unless you get to me soon.

coderextreme avatar Nov 06 '15 06:11 coderextreme

Hey @coderextreme you can try out schema-guru here (http://schemaguru.snowplowanalytics.com/). As for the JSON you supplied it does appear to have successfully produced a JsonSchema.

jbeemster avatar Nov 06 '15 06:11 jbeemster

Yeah, I just tried it. It produced a JSON schema, but if you look, Transforms are specified over and over. We just want one Transform object/attribute in the schema I think, if possible. Do we need to redesign the JSON? It's pretty much decided that they are nested, but we may be able to do some math to only have one transform. But we also allow nested Groups, so...

coderextreme avatar Nov 06 '15 06:11 coderextreme

If one could specify a JSON schema to start derived from an XML Schema, like one from Jsonix Schema Compiler or JAXB/Jsonix, or conversion from OWL, I think that would work better. In this case, our attribute names, arrays and comments have a prefix, @, - or #, so I don't think that would work without some coding. Or if I could take 2 schemas with similar names and copy the names from the schema with the prefix to the schema without the prefix, that would be wonderful.

coderextreme avatar Nov 06 '15 06:11 coderextreme

Ugh, too many transforms.

John

On Nov 6, 2015, at 12:49 AM, Josh [email protected] wrote:

Hey @coderextreme https://github.com/coderextreme you can try out schema-guru here (http://schemaguru.snowplowanalytics.com/ http://schemaguru.snowplowanalytics.com/). As for the JSON you supplied it does appear to have successfully produced a JsonSchema.

— Reply to this email directly or view it on GitHub https://github.com/snowplow/schema-guru/issues/118#issuecomment-154328878.

coderextreme avatar Nov 06 '15 07:11 coderextreme

Hi @coderextreme! Sorry for late reply, I missied this issue somehow. Unfortunately (if I understand everything correct) that is not possible now to derive these nested objects as separate subschemas. Although it would be a nice feature to have, at the same time it's hard to implement and not corresponds with our current needs. I'll schedule it as far-out milestone, but I couldn't promise it will be implemented.

chuwy avatar Nov 12 '15 15:11 chuwy

I'm pretty sure it could be implemented with a map or dynamic object.

coderextreme avatar Oct 22 '21 05:10 coderextreme