callum-oakley / json5-rs

A Rust JSON5 serializer and deserializer which speaks Serde.
ISC License
184 stars 23 forks source link

Make serializer respect all JSON escape characters #17

Closed acanthite1855 closed 4 years ago

acanthite1855 commented 4 years ago

JSON defines several characters (here) which must be escaped when serializing. Currently serializer handles correctly only three of them: \", \n and \. This PR adds the rest of characters: \r, \t, \f, \b, \/.

The deserializer however works properly and does not need any changes. But I added tests just to be sure.

callum-oakley commented 4 years ago

Released as v0.2.6.