Comments (8)
I've been roaming around, since I'm looking for more universal testing suite for myself.
I would make one exception which is I think it is okay for us to accept types other than list and map at the root level.
That's not an exception, both ECMA 404 and RFC 7159 state that JSON text has to conform to the grammar of a JSON value, which permits strings, numbers and and the 3 literals.
it's additional code we need to maintain and test + it slows down the regular path.
I've done this with a LUT and it didn't slow down the regular path at all. The logic is pretty trivial, there isn't much to maintain or test.
from json.
from json.
These are the only checks from JSON_checker that we fail. Rustc-serialize correctly rejects unescaped whitespace in strings.
from json.
Is it a problem if our parser/deserializer is more lenient than the standard, as long as our serializer produces correct json?
from json.
@oli-obk So, you want to guess what the sender wanted to send you? Can be dangerous...
from json.
I think we should aim to accept valid JSON and reject invalid JSON. I would make one exception which is I think it is okay for us to accept types other than list and map at the root level.
from json.
but if accepting valid json requires additional code and conditions, it's additional code we need to maintain and test + it slows down the regular path. If the correct way is faster/easier (like with forbidding trailing commas), then it's fine with me.
from json.
Kind of related, I've been looking at control characters:
The control characters U+0000–U+001F and U+007F come from ASCII
0x7F
is not marked as U
in the LUT.
from json.
Related Issues (20)
- Improve DeserializeSeed documentation
- Deserializing lone surrogate to ByteBuf fails when it's nested in an enum HOT 1
- Is there a way to implement deserialize_in_place?
- Simplify array of objects to 2d array HOT 2
- Conditional Security Risk: `to_vec()` may retain sensitive data in memory on shared systems
- Is it possible to add context to the serializer object?
- Option<Option<T>> does not roundtrip correctly HOT 1
- tests don't compile on stable Rust: std::hash::RandomState only present on nightly
- `Box<RawValue>` and `#[serde(flatten)]` don't work together for deserialization HOT 3
- Bug: untagged union fails to deserialize hashmap with usize as keys
- Support (Feature Request?): Custom Serializer for Option<T>::None which results in `{}` instead of `null`
- `arbitrary_precision` breaks float deserialisation in untagged enum
- Error position wrong for "unicode code point" error HOT 1
- The error message lacks sufficient detail
- Checking for duplicate keys HOT 1
- Binary size increase after #1107 (serde_json v1.0.112) HOT 1
- Deserializing error with UTF-8 BOM (Byte Order Mark) Content HOT 1
- how to make serde_json take ascii text from a json file HOT 2
- { "media": [ ], "label_values": [ { "label": "\u00d0\u0092\u00d1\u0080\u00d0\u00b5\u00d0\u00bc\u00d1\u008f \u00d1\u0081\u00d0\u00be\u00d0\u00b7\u00d0\u00b4\u00d0\u00b0\u00d0\u00bd\u00d0\u00b8\u00d1\u008f", "vec": [ { "timestamp_value": 1708192998 } ] },
- json!() macro recursion limit reached on larger objects with no nesting
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 json.