Skip to content
  • Philipp Gesang's avatar
    lib/audit_logging: add JSON object accessors · 6ef567d1
    Philipp Gesang authored
    
    
    This adds a wrappers for libjansson routines to handle a greater
    variety of data types:
    
            - json_has_key(),
            - json_assert_is_object(),
    
            - json_add_uint32(),
            - json_add_uint64(),
            - json_add_timespec(),
            - json_add_ntstatus(),
            - json_add_base64(),
    
            - json_get_int(),
            - json_get_string(),
            - json_get_sid(),
            - json_get_uint64_t(),
            - json_get_uint32_t(),
            - json_get_array_element(),
            - json_array_length(),
            - json_get_timespec(),
            - json_get_ntstatus(),
            - json_get_guid(), and
            - json_get_base64().
    
    Also add helpers ``json_from_{string,FILEp}()`` for decoding JSON
    from strings and file handles, respectively. The inputs may be
    either JSON objects or arrays. Add a new constructor
    ``json_new_null()`` to make it more obvious that incoming JSON
    values may be of any type.
    
    Signed-off-by: default avatarPhilipp Gesang <philipp.gesang@intra2net.com>
    6ef567d1