digitalmars.D.learn - JSON Serialization with runtime filtering.
- Alexander Milushev (4/4) Jul 22 2016 I there any json serialization library which allow to make
- yawniek (5/9) Jul 23 2016 can you give an example? i'm not sure what you mean by "ignore at
- Alexander Milushev (3/13) Jul 25 2016 Skipping all non-initialized fields in struct/class, or skipping
I there any json serialization library which allow to make decision about ignoring fields in runtime? I trying to write rest client but server accept either 'cmd' or 'args' field for example and I need to find solution.
Jul 22 2016
On Friday, 22 July 2016 at 12:36:31 UTC, Alexander Milushev wrote:I there any json serialization library which allow to make decision about ignoring fields in runtime? I trying to write rest client but server accept either 'cmd' or 'args' field for example and I need to find solution.can you give an example? i'm not sure what you mean by "ignore at runtime" if its simply ignoring fields of a struct then thats easily doable with https://github.com/tamediadigital/asdf
Jul 23 2016
On Saturday, 23 July 2016 at 21:30:52 UTC, yawniek wrote:On Friday, 22 July 2016 at 12:36:31 UTC, Alexander Milushev wrote:Skipping all non-initialized fields in struct/class, or skipping all field equal some default value which can be set compile time.I there any json serialization library which allow to make decision about ignoring fields in runtime? I trying to write rest client but server accept either 'cmd' or 'args' field for example and I need to find solution.can you give an example? i'm not sure what you mean by "ignore at runtime" if its simply ignoring fields of a struct then thats easily doable with https://github.com/tamediadigital/asdf
Jul 25 2016