Giter Club home page Giter Club logo

Comments (4)

julienbaley avatar julienbaley commented on July 18, 2024 1

Hi @dmeranda ; it's now been a few years; any chance this could get resolved, or should I look elsewhere?

from demjson.

dmeranda avatar dmeranda commented on July 18, 2024

I assume this is related to the portability warning produced by jsonlint when reading JSON that contains a raw (not escaped) astral plane character in a string value, e.g., the first warning below:

$ jsonlint myfile.json 
myfile.json:1:9: Warning: Strings containing non-BMP characters (U+101000) may not be portable
   |  At line 1, column 9, offset 9
myfile.json:2:12: Warning: Integers larger than 53-bits are not portable
   |  At line 2, column 12, offset 26
myfile.json: ok, with warnings

whereas using the --allow non-portable option suppresses the warning, but also suppresses other still-relevant warnings too,

$ jsonlint --allow non-portable myfile.json 
myfile.json: ok

First, for those that may read this issue... this should not be a problem if you are just reading JSON using the API, as when using the demjson module in your own Python application, nor when writing JSON. It is only a jsonlint issue where it tries to warn about valid, yet possibly non-portable data.

Yes, this is a fair issue to raise. Back when demjson was written, and this warning in particular, there were many JSON implementations which could not handle the full Unicode repertoire, especially without using the escaped surrogate pair syntax. Hence the non-portability warning. I believe that these faulty implementations may be much rarer today, so separating this particular warning out with its own option probably makes sense.

It probably warrants reviewing all the other non-portability warnings to see if any others are similar. I will look into this.

from demjson.

julienbaley avatar julienbaley commented on July 18, 2024

Thanks for the answer. I've submitted a PR for this particular case, but if you have a better approach, feel free to ignore. :)

from demjson.

julienbaley avatar julienbaley commented on July 18, 2024

Hi @dmeranda , I was wondering if I had any thoughts on this?

from demjson.

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.