Skip to content

Look into optimized reading JSON for known classes by skipping intermediate map/list/etc #301

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

Open
kevmoo opened this issue Aug 30, 2018 · 6 comments

Comments

@kevmoo
Copy link
Collaborator

kevmoo commented Aug 30, 2018

See https://github.com/mafintosh/turbo-json-parse

@ghost
Copy link

ghost commented Jan 8, 2019

Isn't the "known schema" the @JsonSerializable-tagged class?

@kevmoo
Copy link
Collaborator Author

kevmoo commented Jan 8, 2019

@denkuy – you could imagine creating a custom parser that creates annotated objects directly, without first creating the JSON literal objects. That's what this issue is discussing...

@ghost
Copy link

ghost commented Jan 8, 2019

"JSON literal objects" as in a "dart String, json format" or "dart Map<String, dynamic>"?

What is the "known schema" in this case? Sample data or a json schema (something like https://json-schema.org/ )

@kevmoo
Copy link
Collaborator Author

kevmoo commented Jan 8, 2019

Instead of

bytes/String -> [JSON decode] -> Map<String, dynamic> -> [MyClass.fromJson] -> MyClass

Do this

bytes/String -> [MyClassConverter] -> MyClass

@kevmoo kevmoo changed the title Look into optimized reading with known schema Look into optimized reading JSON for known classes by skipping intermediate map/list/etc Jan 8, 2019
@kevmoo
Copy link
Collaborator Author

kevmoo commented Jan 17, 2019

@kevmoo
Copy link
Collaborator Author

kevmoo commented Jan 17, 2019

See also dart-lang/sdk#35693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant