Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

NGSerializer Boolean and Dates are not Idiomatic for JSON and XML Formats


I was wondering if there is a way, or if there are plans to update NGSerializer so that when you have a boolean type that you get the more correct true or false in JSON and XML rather than 0 or 1.

Also for Dates, it looks like currently the Delphi extended value for dates is output but again a more idiomatic approach would be the ISO 8601 format or a JavaScript Serialize format and so forth.

Maybe I am missing something here if there is a way to specify the boolean and TDateTime formats I would greatly appreciate knowing. If not then please let me know if you plan to update your product to support the more appropriate values for these data types.


Todd Flora
Retail Pro Inc.


  • 6 Comments sorted by Votes Date Added
  • Posts: 0 Accepted Answer Vote Up0Vote Down

    We will think about your proposal. For now, however, you can use custom value converters feature to stream out/in bools and TData as you want.
  • Thank you for your consideration. 

    Is possible can you please point me at an example of how to use a converter.


    Todd Flora
    RetailPro Inc.
  • Also can you answer the following:

    1) If I use a Value Converter will this need to be applied to every field in an object of that type or is there a way to just say all Boolean values use this converter.

    2) When I build a payload without an object how to I apply the converter.


  • 1) I have confirmed my email several times now and still have the you need to confirm your email address for this forum. Is the forum engine broken?

    2) I have made changed to the NGSerializer to accomidate boolean and date idiomatic functionality. Do you have a mechanism for a pull request? I would gladly provide my code changed to you if you might be interested in integrating them into the commercial product.


    Todd Flora.
  • Hi,

    1) We'll check forum engine issue...
    2) Just send modified files (please mark somehow modified lines) to our support e-mail:
Sign In or Register to comment.