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

Type of Data prop #224

Closed
tpoxa opened this issue Jan 11, 2023 · 2 comments · Fixed by #226
Closed

Type of Data prop #224

tpoxa opened this issue Jan 11, 2023 · 2 comments · Fixed by #226
Labels

Comments

@tpoxa
Copy link

tpoxa commented Jan 11, 2023

vue-json-pretty works great with any JSON data even string which is still valid JSON but not a JSON object
Only problem that I am having a lots of vue warnings regarding invalid type of a prop.

Invalid prop: type check failed for prop "data". Expected Object, got String with value ...

Can we allow data to be a string too?

Thanks

@leezng
Copy link
Owner

leezng commented Jan 16, 2023

Currently, the data type is set to object, which may be a problem:

type: Object as PropType<JSONDataType>,

@tpoxa
Copy link
Author

tpoxa commented Jan 16, 2023

Yes. I know.
Can you allow to be prop a STRING or OBJECT?

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

Successfully merging a pull request may close this issue.

2 participants