Open codeleep opened 1 year ago
I agree this is a bug.
In general, I'd pass options to both stringify and parse, but the defaults should indeed round-trip.
I don't know if this would be considered a bug. There simply isn't a way to know what the original type a property was after it has been stringify'd. It's not guaranteed that all users will want numbers converted back to an integer type.
You could create some type of mapping to run your parsed response through which ensures the data types are converted to your liking.
hmm, that's a good counterpoint.
The property names have brackets around them too: [price]
vs price
.
When my json is like this
i use qs.stringify(json) and qs.parse(json) . but result is
It was obvious that this was a mistake. How should I solve it
I tried to change multiple versions as well, but the latest version still did not fix the problem.