yajl-ruby icon indicating copy to clipboard operation
yajl-ruby copied to clipboard

Yajl can't decode it's own output when there is a BigDecimal(Infinity) involved.

Open aselder opened this issue 14 years ago • 0 comments

Fire up IRB:

Yajl::Parser.parse(Yajl::Encoder.encode({"a" => BigDecimal.new("Infinity")}))

lead to:

Yajl::ParseError Exception: lexical error: invalid char in json text. {"a":Infinity} (right here) ------^

Infinity is not legal JSON and the parser correctly flags it. However the encoder shouldn't be spitting this out.

Ruby 1.9.2-p290

aselder avatar Nov 04 '11 20:11 aselder