Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing a string text results in an array of characters #50

Open
mschipperheyn opened this issue May 6, 2024 · 4 comments
Open

Parsing a string text results in an array of characters #50

mschipperheyn opened this issue May 6, 2024 · 4 comments

Comments

@mschipperheyn
Copy link

If you try to display a regular string with JsonView (sometimes you can't predict the input), it renders an array of characters. I would expect the string in an "illegal scenario" to be rendered as is.

@jaywcjlove
Copy link
Member

@mschipperheyn I cannot reproduce the error you described, please provide an example that can reproduce the error.

@mschipperheyn
Copy link
Author

I've added a sandbox here

IMHO JsonView should deal with plain strings in a way that displays it normally

@jaywcjlove
Copy link
Member

image

@mschipperheyn This package is for JSON preview, not a string preview tool.

- <ReactJsonView value="data" />;
+ <ReactJsonView value={{ a: "data" }} />;

@aaronvg
Copy link

aaronvg commented Dec 14, 2024

hmmm lots of folks do have json objects or strings. It'd be great to not have to worry about simple strings, and have them match the theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants