Giter Club home page Giter Club logo

Comments (2)

SirWaddles avatar SirWaddles commented on July 30, 2024

While I realise it's maybe not ideal, duplicate keys are preserved in the internal model and the serialized json. I'm not sure what code you're using that would be removing them.

This is the serialized version of the file you're referring to:

My view is that there's not really an easy to way to solve this. The structure in the assets has duplicate keys, and there's not really a way to be consistent about guessing when to use an array and when not to - the only solution is to always use an array when there could maybe be duplicate keys. Otherwise, only using an array when theres >1 items would result in a pretty inconsistent schema.

So while it's maybe not the best solution, the current system seems to be the least worst option. It just may take some doing to make sure that code realises that there is non-standard stuff going on.

from johnwickparse.

Gnejs avatar Gnejs commented on July 30, 2024

Hey, thanks for the reply, you are correct, the missing key:value sets are not due to the project, apparently the JSON formatter in Sublime is destructive and got rid of the duplicates..so yeah that was very unexpected. 😮 Sorry for the misinformation.

I'd still say that duplicate names is rather bad since JSON is not supposed to have them according to the specification, but if you feel like it is not worth the trouble that is fine. :)
I can just add a middle step to give the raw exported JSON some "massage"/sanity check to reformat it to correct JSON. As long as the exported data has all the information, which it has, I'm happy. :)

Thanks again, very helpful project! Feel free to close the issue if it is 'working as expected'.

Cheers!

from johnwickparse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.