Skip to content

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
2 participants