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

RFC for introducing JSON access methods #191

Closed
wants to merge 4 commits into from

Conversation

sgebbie
Copy link

@sgebbie sgebbie commented Nov 19, 2021

This provides an RFC for introducing access methods (getters) into the JSON package so as to facilitate document mutation.

ponylang/json#16

This sketches the consideration for adding `apply()` methods to JSON,
together with potential alternatives.

ponylang/ponyc#3922
@sgebbie sgebbie changed the title RFC for introducing JSON getters RFC for introducing JSON access methods Nov 19, 2021

- document data access: `fun apply(): this->JsonType! => ...`,
- object data access: `fun apply(): this->Array[JsonType]! => ...`,
- array data access: `fun apply(): this->Map[String, JsonType]! => ...`.
Copy link

@jasoncarr0 jasoncarr0 Nov 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: these !s are not necessary here, but it matters more on the code PR since that shows up in docs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the RFC. I still need to update the code PR.

ponylang/ponyc#3922
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 6, 2024
@SeanTAllen SeanTAllen removed the discuss during sync Should be discussed during an upcoming sync label Feb 6, 2024
@SeanTAllen
Copy link
Member

Closing as this doesn't need an RFC anymore as the library in question is now freestanding.

https://github.com/ponylang/json

@SeanTAllen SeanTAllen closed this Feb 6, 2024
@ponylang-main ponylang-main added discuss during sync Should be discussed during an upcoming sync and removed discuss during sync Should be discussed during an upcoming sync labels Feb 6, 2024
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.

4 participants