uiwjs / react-json-view

A React component for displaying and editing javascript arrays and JSON objects.
https://uiwjs.github.io/react-json-view/
MIT License
212 stars 12 forks source link

Wrong data type conversion #25

Open liu-wh opened 11 months ago

liu-wh commented 11 months ago

When I try to add value "@thlon.202!", It will be forced to render as a date type, but it is a string image Version : 1.8.3

jaywcjlove commented 11 months ago

@liu-wh Please provide an example where you can reproduce the error -> https://codesandbox.io/p/sandbox/determined-framework-l44s2d?utm_source=dotnew&file=%2Fsrc%2FApp.js

liu-wh commented 11 months ago

@jaywcjlove sorry, please use this link to test link

jaywcjlove commented 11 months ago
image

Oh...

jaywcjlove commented 11 months ago

@liu-wh Upgrade v1.12.2

liu-wh commented 10 months ago

@liu-wh Upgrade v1.12.2 v1.12.2 s ok, thanks

MaeenBadea commented 9 months ago

The issue still exists with v1.12.2

The bug is reproducible with "\S+:\d{3,4}" so something like "some_text:9000" or"some_text:900" will return a date object with the year 9000 instead of the given text.

jaywcjlove commented 9 months ago

@MaeenBadea I didn't think of a good solution.