Null Variant question

About Monkey 2 Forums Monkey 2 Programming Help Null Variant question

This topic contains 0 replies, has 1 voice, and was last updated by  Ethernaut 1 year, 3 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #12867

    Ethernaut
    Participant

    In the following code, I’d like to detect if the field has a null value WITHOUT knowing the field’s type in advance, in other words, I cannot cast the variant obtained by DeclInfo.Get( instance ) and see if it has a null value.

    The goal here is to not Serialize any fields that contain a Null value, and serialize everything else.
    (I’m not serializing classes “for real” in this simple example, it’s just adding their class name as the value)

    Is it doable somehow? Or would this be a feature request?
    It’s one of the last missing puzzle pieces I need to have a fully functional Serializer module.

    Any help appreciated!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.