• Iustin Pop's avatar
    Extend the Template Haskell loadFn model · 1c7bda0a
    Iustin Pop authored
    
    
    Currently, we only allow field-by-field de-serialisation. Since we
    have cases where information about how to un-serialise a field is
    split across two JSON fields (e.g. disk type and disk logical_id,
    hypervisor and hvparams, etc.), we need to pass the entire object to
    custom read functions.
    
    Furthermore, since we will have to generate two actual fields from the
    single in-memory field, we need to extend the custom save function so
    that they can generate additional fields beyond the "main" field value
    they currently generate.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
    1c7bda0a
THH.hs 29.3 KB