json icon indicating copy to clipboard operation
json copied to clipboard

JSON::Pure fix strict mode

Open casperisfine opened this issue 1 year ago • 3 comments

Followup: https://github.com/flori/json/pull/519 Fix: https://github.com/flori/json/issues/584

casperisfine avatar May 09 '24 12:05 casperisfine

I also noticed the docs in https://github.com/flori/json/blob/4f876a8bf7c45972800bae5bdbaf892aa2f714a5/lib/json/pure/generator.rb#L222 are wrong, could you fix that too?

And the alignment in https://github.com/flori/json/blob/4f876a8bf7c45972800bae5bdbaf892aa2f714a5/lib/json/pure/generator.rb#L143 is inconsistent (I dislike this kind of alignment, too high maintenance and diff noise, but might as well be consistent in one way, i.e. all or none aligned)

eregon avatar May 09 '24 12:05 eregon

I also noticed

I'd rather not bundle multiple unrelated fixes in the same PR. Makes merging more complicated.

casperisfine avatar May 09 '24 12:05 casperisfine

Ah sorry, it's @script_safe misaligned, and that's unrelated indeed.

OTOH I think fixing the description of def strict? is very related (but not necessary in this PR, fair enough).

eregon avatar May 09 '24 12:05 eregon