Comments (1)
Great explanation. You are correct - the parser probably not accept these. However, as Javascript's JSON methods do support stringify and parse illegal surrogates (at least Firefox did in my quick test), this should probably be gated behind a parser flag that isn't set by default.
Ideally the parser and writer would have a "strict utf16 surrogate" mode, ie:
JsonWriter.strictSurrogateSupport().indent(" ") ...
from nanojson.
Related Issues (20)
- Test failures in https://github.com/nst/JSONTestSuite HOT 3
- Cut a 1.1 release HOT 1
- Add a benchmark to https://github.com/fabienrenaud/java-json-benchmark HOT 3
- split got me throw a JsonWriterException: Unclosed JSON objects and/or arrays when closing writer HOT 2
- [Feature] JsonWriter ByteArray mode HOT 1
- How to get length of an array
- nanojson could use a more active maintainer HOT 2
- Add 'Automatic-Module-Name' to MANIFEST.MF to support Java 9+ modules HOT 3
- Modular nanojson compatible with jmod/jlink compilation HOT 1
- ArrayIndexOutOfBoundsException HOT 2
- Make keys preserve ordering in JsonObject HOT 2
- Bump minimum Java to Java 8? HOT 6
- Custom UTF8 stream decoding overhead/gain HOT 2
- Add a reader mode with more exceptions HOT 2
- Writing of lazy numbers HOT 4
- com.grack.nanojson.JsonLazyNumber should implement toString() like other java.lang.Number classes HOT 5
- Stack overflow error caused by nanojson parsing of untrusted JSON String
- Expose JsonWriterBase#preValue(java.lang.String) HOT 1
- non-finite numbers are written as invalid JSON
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 nanojson.