Skip to content

Releases: alloc/json-qs

v1.2.0

28 Oct 19:09
Compare
Choose a tag to compare
  • Expose more types publicly, like CodableValue and DecodedValue.

v1.1.0

28 Oct 19:08
Compare
Choose a tag to compare
  • Add support for Date objects. See the spec for more details.

v1.0.2

28 Oct 19:07
Compare
Choose a tag to compare
  • Remove undefined from possible decode return values.
  • Ensure array type returned by decode is mutable. This was only a type-level issue. Decoded arrays have always been mutable at runtime.

v1.0.1

27 Oct 17:34
Compare
Choose a tag to compare
  • Prevent prototype pollution when decoding (i.e. throw on __proto__ key)
  • Call toJSON method (if present) when encoding
  • Remove need to escape leading hyphen in string if not followed by a digit:
     encode({ sort: '-date' })
     // v1.0.0 → "sort=\-date"
     // v1.0.1 → "sort=-date"
  • Throw on unterminated object when decoding:
     decode('a={b:{')
     // v1.0.0 → { a: { b: {} } }
     // v1.0.1 → throws "Unterminated input" error