glaze icon indicating copy to clipboard operation
glaze copied to clipboard

Add blacklist support for partial writing

Open stephenberry opened this issue 1 year ago • 2 comments

We should be able to optionally exclude fields when writing structs from the write calls, besides utilities like glz::hide

stephenberry avatar Jul 09 '24 13:07 stephenberry

Can we add support for partial writing with a dynamically specified set of whitelist/blacklist fields and globs? I’m trying to use Glaze to implement response filtering functionality as described in Elasticsearch's common options documentation.

Thank you!

amosbird avatar Nov 13 '24 02:11 amosbird

@amosbird, dynamic partial writing is definitely desired. A long term goal is to support JMESPath, which would also require this support.

The reflection system in Glaze already provides an array of keys and a tuple of values, we just need to write a higher level of abstraction over glz::reflect so that we can more easily iterate at runtime. I'll keep your comment in mind as I continue to brainstorm the best approach.

stephenberry avatar Nov 13 '24 15:11 stephenberry