-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
json and json2 issues #16477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In my personal opinion, as a transition from json to json2, Why not use Then at least all encoding issues would be consolidated into json2. Then we can free ourselves from the hassle of |
The whole point of json2, is that it is pure V code, and does not depend on a C library. |
I know it? As a transitional measure, but I guess I didn't explain it well enough? Anyway, I want to remove import x.json2
struct Foo{
name string
}
fn main(){
f := json2.decode<Foo>('{"name":"abc"}') or {return}
dump(f)
}
Then the user uses json2 for encoding and json for decoding. Do you think they would do that? I don't think so. They would use json for both. Of course, we could wait until json2.decode() no longer requires Besides do you want to leave the above json related many bugs until from_json() is removed from json2.decode()? After this, developers who want pure V should make an effort to remove cjson from json2. However, when sorted out, decoding is by far the more problematic. |
JSON2 should be able to replace JSON, right |
Eventually. Still needs some work. |
Describe the bug
If any of these issues can already be closed, please do so if you have the authority.
If we are integrating into json2, the problems we have with json should be resolved in json2.
json
encode
json.encode()
optional field. #16462decode
x.json2
map_string_string
(right expression) asx.json2.decode
#6722The text was updated successfully, but these errors were encountered: