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

Should JArray operations be FFI like JObject? #3

Open
natefaubion opened this issue Sep 3, 2023 · 1 comment
Open

Should JArray operations be FFI like JObject? #3

natefaubion opened this issue Sep 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@natefaubion
Copy link

In #1 Array JSON was turned into JArray. I think this is a useful thing to do and a good assumption that a JArray is not necessarily an Array. However all JArray operation are implemented in terms of toArray. So we've changed the assumption from "It's always an Array" to "In order to observe anything, it must be converted to an Array". This implies that there is a 0-cost conversion to Array, since that would be the only way one could write performant codecs. Should JArray operations be FFI like JObject?

@natefaubion natefaubion changed the title All JArray operations are implemented in terms of toArray Should JArray operations be FFI like JObject? Sep 3, 2023
@garyb garyb added the enhancement New feature or request label Sep 3, 2023
@garyb
Copy link
Member

garyb commented Sep 3, 2023

Yeah, for sure. I was just being lazy at the time, primarily wanted to get JArray as a type in before anyone looked at using the library.

@garyb garyb mentioned this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants