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

Remove kind field for GenericTrace and Shape. #54

Merged
merged 1 commit into from
Jun 21, 2016
Merged

Conversation

sglyon
Copy link
Member

@sglyon sglyon commented Jun 20, 2016

This makes it so JSON._print(..., hf::HasFields, ...) = JSON._print(..., hf.fields, ...) instead of re-implementing most of the object serialization for Shape and GenericTrace types.

Ref: JuliaLang/METADATA.jl#5427

Is there a way to avoid overloading JSON._print (hinted at by @TotalVerb here)? I don't think defining JSON.json will work here for reasons described here

cc @TotalVerb, @tkelman

Also makes implementation of `JSON._print` just forward on to the fields field
@sglyon
Copy link
Member Author

sglyon commented Jun 20, 2016

Also cc @tbreloff. I think I did this in a backwards compatible way as long as you don't try to access the kind field of a GenericTrace or a shape.

I ran it through ExamplePlots and it seemed to work ok. If you notice that anything has broken please let me know.

@sglyon sglyon merged commit 909e16b into master Jun 21, 2016
@sglyon sglyon deleted the sl/easy_json branch August 26, 2016 22:31
@sglyon sglyon restored the sl/easy_json branch August 30, 2016 19:41
@sglyon sglyon deleted the sl/easy_json branch September 8, 2016 07:20
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.

1 participant