How to serialize to an object without the Symbol(TypeBox.Kind)
?
#1190
theogravity
started this conversation in
General
Replies: 1 comment 3 replies
-
@theogravity Hi,
You can use JSON.stringify to serialize. Symbol properties are non-serializable as JSON so they will not appear in the result. const T = Type.Object({ x: Type.String() })
const S = JSON.stringify(T, null, 2)
console.log(S) // {
// "type": "object",
// "properties": {
// "x": {
// "type": "string"
// }
// },
// "required": [
// "x"
// ]
// } Hope this helps |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I create my typebox schema and do something like
The result returns with the object, but it has items like:
Beta Was this translation helpful? Give feedback.
All reactions