• Alexander Graf's avatar
    QJSON: Add JSON writer · 190c882c
    Alexander Graf authored
    
    
    To support programmatic JSON assembly while keeping the code that generates it
    readable, this patch introduces a simple JSON writer. It emits JSON serially
    into a buffer in memory.
    
    The nice thing about this writer is its simplicity and low memory overhead.
    Unlike the QMP JSON writer, this one does not need to spawn QObjects for every
    element it wants to represent.
    
    This is a prerequisite for the migration stream format description generator.
    
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
    Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
    190c882c