Skip to content
This repository has been archived by the owner. It is now read-only.

Use a JSON library, please don't manually create JSON #32

Closed
yaronyg opened this issue Jul 16, 2015 · 3 comments
Closed

Use a JSON library, please don't manually create JSON #32

yaronyg opened this issue Jul 16, 2015 · 3 comments
Assignees

Comments

@yaronyg
Copy link
Member

@yaronyg yaronyg commented Jul 16, 2015

The code used in Android to talk with the JXCore native layer manually creates JSON objects. This is both error prone and hard to read. It would be better to use a JSON serializer with a native Java object.

@obastemur
Copy link
Contributor

@obastemur obastemur commented Jul 16, 2015

PS: When performance is the case, instead of creating JSON, you might consider using primitive types for better performance.

@yaronyg
Copy link
Member Author

@yaronyg yaronyg commented Jul 16, 2015

Fair enough but this is JSON for returning data in JXCore native calls. All of our native calls are "chunky" enough that perf isn't an issue. So in that case I would argue that code cleanliness is more important.

@DrJukka
Copy link
Contributor

@DrJukka DrJukka commented Aug 11, 2015

Did change the implementation to use real JSON APIs, definitely required for string encoding, characters such as line-feed, are not handled right with earlier implementation story_00_juksilve as well as today updated library implementation are both now using real JSON API.

@DrJukka DrJukka closed this Aug 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants