Skip to content

Conversation

@daurnimator
Copy link
Contributor

@daurnimator daurnimator commented Sep 2, 2019

  • dump json of arbitrary types
  • load json of arbitrary types

@daurnimator daurnimator added enhancement Solving this issue will likely involve adding new logic or components to the codebase. standard library This issue involves writing Zig code for the standard library. labels Sep 2, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Sep 3, 2019
@andrewrk andrewrk removed this from the 0.6.0 milestone Oct 1, 2019
@xackus
Copy link
Contributor

xackus commented Nov 3, 2019

@daurnimator @andrewrk What are the prospects for this pull request?
Can it be merged as it is right now?

I can write the loading part, using the existing JSON parser.
I think we will need a tagged union "MaybeDefined" to distinguish undefined and null.
You could pass an option to decide if undefined fields will be mapped to null or produce an error if it's not MaybeDefined.

I will use this to simplify writing functions for JSON-RPC. I am writing a basic language server.

@andrewrk
Copy link
Member

andrewrk commented Nov 26, 2019

This PR has been a draft for a couple months. Please re-open when it's ready for review.

@andrewrk andrewrk closed this Nov 26, 2019
@daurnimator daurnimator mentioned this pull request Jan 28, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Solving this issue will likely involve adding new logic or components to the codebase. standard library This issue involves writing Zig code for the standard library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants