JuliaIO / JSON.jl

JSON parsing and printing
Other
313 stars 101 forks source link

RFC: Add singleton type support #330

Closed Wynand closed 2 years ago

Wynand commented 2 years ago

This adds support for writing singleton types, and hopefully will also support serialization

The idea is that Singleton types (specifically types without properties) are identical unless they're parametric. Currently this just prints the type of the singleton, which means there's no way to distinguish a saved type versus an instantiated singleton object

codecov[bot] commented 2 years ago

Codecov Report

Merging #330 (68550fa) into master (f93688a) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
+ Coverage   99.51%   99.54%   +0.03%     
==========================================
  Files           5        5              
  Lines         410      438      +28     
==========================================
+ Hits          408      436      +28     
  Misses          2        2              
Impacted Files Coverage Δ
src/Writer.jl 98.27% <100.00%> (+0.14%) :arrow_up:
src/Parser.jl 100.00% <0.00%> (ø)
src/specialized.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f93688a...68550fa. Read the comment docs.