Skip to content
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

[WIP] Fully-functional Slices #166

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

[WIP] Fully-functional Slices #166

wants to merge 4 commits into from

Conversation

Miha-x64
Copy link
Contributor

@Miha-x64 Miha-x64 commented Mar 4, 2018

Slices may be always used instead of Strings.
They can be read fast way, when there are no multibyte chars or escape sequences, or slow way, with String allocation.

Not done yet: String deduplication (less allocations), especially when parsing big lists of objects with similar structure.

@taowen
Copy link
Contributor

taowen commented Mar 5, 2018

slice is good when the input is byte array, and there is not unicode or escape. when the input is a input stream, the allocation can not be avoided.

@Miha-x64
Copy link
Contributor Author

Miha-x64 commented Mar 6, 2018

In your variant reading slices may not succeed. For example, enum decoder reads a Slice without any fallback. But enum constant may contain non-unicode characters, while, for instance, PHP's json_encode function encodes such characters using \uXXXX.

@Miha-x64
Copy link
Contributor Author

Very strange. Tests, failing on Travis, are working correctly on my computer. Except ones with Streaming Category which failing on enableStreamingSupport with Javassist errors.

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

Successfully merging this pull request may close these issues.

None yet

2 participants