Closed marcklingen closed 7 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
json-view | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 30, 2023 2:35am |
react18-json-view | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 30, 2023 2:35am |
It does look better, I see… umm… will it have any impact on other users’ copying?
Ok, I will make improvements based on this.
Agree, it changes the behavior and we don't know if someone relies on it.
Alternatively, making the 'space' parameter configurable via an optional prop could also work.
Agree, it changes the behavior and we don't know if someone relies on it.
Alternatively, making the 'space' parameter configurable via an optional prop could also work.
I add a new parameter customizeCopy
, and you can import the internal stringfy
and set: customizeCopy: (node: any) => stringify(node, 4)
.
This approach will provide better scalability, I thought 🙌.
Additionally, you can directly try it out on the storybook.
Thanks @YYsuni! Added it to our project here (needed to copy your whole function to retain some of the capabilities): https://github.com/langfuse/langfuse/pull/621/files#diff-aa90080c04079bff9605508968f2106518fc1418f230e8ce1e73569cdc5d96b6
I suggest to default to pretty-printed json when copying a node.