Skip to content

What is the proper way to parse decoded data? #1089

Answered by sinclairzx81
anotheri asked this question in Q&A
Discussion options

You must be logged in to vote

@anotheri Hi,

By readiing some issues in this repo, source code and after a couple trials and errors, i found result which seems works as i want. I'd like to hear your feedback on this function, and ask for any potential issues, or if there is better/proper way to do this?

The example code you provided is perfectly fine for processing a value. TypeBox isn't very opinionated with respect to the functions used, or the order in which they are used. However, the Parse function does provide a library nominated "ideal" way to call these functions (but it is the kitchen sink)

https://github.com/sinclairzx81/typebox/blob/master/src/value/parse/parse.ts#L43C1-L57C2

P.S. I've tried to use both V…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anotheri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants