Skip to content

Not printed correctly into JSON #187

@mmikhasenko

Description

@mmikhasenko

When printing a Measument to JSON, the resulting file in not valid due to ± sign.

using Measurements
using JSON

begin
	open("test.json", "w") do io
		JSON.print(io, Dict("value" => 1.1 ± 3.3))
	end
	# 
	open("test.json") do io
		JSON.parse(io)
	end
end

throws,

Expected ',' here
 ...when parsing byte with value '194'

posted here
JuliaIO/JSON.jl#375

It might turn out not JSON problem, rather Measurements.jl problem, since JSON.jl does not have rules for customary objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions