brianmario/yajl-ruby — Issue #88: Yajl can't decode it's own output when there is a BigDecimal(Infinity) involved.
Author: aselder
Created: 2011-11-04 20:00:24+00:00
State: open

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