Skip to content

Toward compatibility with libfyaml generics #180

@embray

Description

@embray

WIP:

libfyaml 1.0 is in its alpha release stage and it brings with it what it was previously lacking (and which a large chunk of the code in this library attempts to implement): full support for generic value types and serialization/deserialization to C native objects (in libasdf these are achieved through asdf_value_t and the extension framework -- libfyaml brings something called fy_generic).

I first became aware of the fy_generic framework a few months ago sort of by accident, as it wasn't widely advertised yet, when I stumbled on the development branch for it, and it does indeed replicate much of what I've done with asdf_value_t -- in addition to supporting mappings and sequences, an fy_generic also wraps YAML scalar values, determines their appropriate value types, and supports casting them to C types (ints, floats, bools, and char *, etc. There is also some serdes support that is new since I last looked at it, and haven't quite explored yet.

A lot of it works similarly to my asdf_value_t work, though there are other areas where it's more sophisticated, and can also take more advantage of being tightly integrated into libfyaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions