Comments (4)
Hi @dmeranda ; it's now been a few years; any chance this could get resolved, or should I look elsewhere?
from demjson.
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.
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.
Hi @dmeranda , I was wondering if I had any thoughts on this?
from demjson.
Related Issues (20)
- trailing whitespace
- high cpu load
- enum encode error:
- python -m demjson
- jsonlint changes foat values HOT 8
- Version on CentOS EPEL is out of date and exits 0 on errors HOT 2
- Code bug? HOT 2
- Failed to import under Python 2.7.13
- Documentation page is not opening HOT 2
- deron.meranda.us is Down, Causing Pip Installs to Fail HOT 1
- Importing ABC directly from collections module was removed in Python 3.9
- “Gibberish” false positive when parsing Unicode identifiers in objects HOT 4
- demjson.JSONDecodeError: ('Bad number', '.')
- syntax error
- To support numpy?
- Setuptools 58.0.0 has removed support for 2to3 during builds, breaks demjson for Python 3.x HOT 8
- demjson pip install fails with python3.7 and 3.7 but not 3.6. HOT 1
- Object literal (dictionary) is not terminated
- error in demjson setup command: use_2to3 is invalid. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demjson.