Skip to content

What's the difference between glz::manage and glz::custom now? #498

Closed Answered by stephenberry
sam20908 asked this question in Q&A
Discussion options

You must be logged in to vote

glz::custom has two parameters, which can be a member pointer, a std::function, or a lambda function. These two parameters are directly associated with reading and writing.
glz::manage is useful when you want to add custom handling around reading from and writing to a specific member. So, glz::manage takes three parameters, where the first is the value that is being manipulated and the latter two parameters are read and write functions. Manage is especially useful for values that you want to treat like the root value, but may be connect to hardware and thus need to be read/written before the encode/decode to JSON can occur.

I plan to document these better in the future. They are recent ad…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stephenberry
Comment options

You must be logged in to vote
0 replies
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