## JSON Proxy

JSON Proxy — Wrapper class for JsonObjects

## Functions

FontManagerJsonProxy * | font_manager_json_proxy_new ()
gboolean | font_manager_json_proxy_is_valid ()
void | font_manager_json_proxy_generate_properties ()

## Types and Values

#define | FONT_MANAGER_JSON_PROXY_SOURCE
| FontManagerJsonProxyProperties
#define | FONT_MANAGER_TYPE_JSON_PROXY
struct | FontManagerJsonProxyClass
| FontManagerJsonProxy

## Object Hierarchy

        GObject
        ╰── FontManagerJsonProxy
            ├── FontManagerFamily
            ├── FontManagerFont
            ├── FontManagerFontInfo
            ╰── FontManagerOrthography

## Includes

    #include <font-manager-json-proxy.h>

## Description

Simple wrapper around a JsonObject which maps object members to gobject properties.

## Functions

### font_manager_json_proxy_new ()

    FontManagerJsonProxy *
    font_manager_json_proxy_new (void);

#### Returns

A newly created FontManagerJsonProxy. Free the returned object using ``g_object_unref()``.

[transfer full]

### font_manager_json_proxy_is_valid ()

    gboolean
    font_manager_json_proxy_is_valid (FontManagerJsonProxy *self);

The default method returns `TRUE` if source-object is not NULL.

#### Parameters

self | FontManagerJsonProxy. | [nullable]

#### Returns

`TRUE` if proxy is valid

### font_manager_json_proxy_generate_properties ()

    void
    font_manager_json_proxy_generate_properties
                                   (GParamSpec *pspec[],
                                    const FontManagerJsonProxyProperties *properties,
                                    gint num_properties);

Automatically generate class properties from an array of FontManagerJsonProxyProperties.

A property with type G_TYPE_BOXED is assumed to be a JsonArray. A property with type JSON_TYPE_OBJECT is assumed to be the `source` -object.

#### Parameters

pspec | (out caller-allocates) :empty array of GParamSpec to store results |
properties | array of FontManagerJsonProxyProperties |
num_properties | number of entries in properties |

## Types and Values

### FONT_MANAGER_JSON_PROXY_SOURCE

    #define FONT_MANAGER_JSON_PROXY_SOURCE "source-object"

### FontManagerJsonProxyProperties

    typedef struct {
        const gchar *name;
        const GType type;
        const gchar *desc;
    } FontManagerJsonProxyProperties;

This struct provides the information required to map a member of a JsonObject to a gobject property in a FontManagerJsonProxy subclass.

#### Members

const gchar *`name`; | Property name |
const GType `type`; | GType of property |
const gchar *`desc`; | Description of property |

### FONT_MANAGER_TYPE_JSON_PROXY

    #define FONT_MANAGER_TYPE_JSON_PROXY (font_manager_json_proxy_get_type ())

### struct FontManagerJsonProxyClass

    struct FontManagerJsonProxyClass {
        GObjectClass parent_class;

        gboolean (* is_valid) (FontManagerJsonProxy *self);
    };

#### Members

`is_valid` () | default method returns `TRUE` if source-object is not NULL |

### FontManagerJsonProxy

    typedef struct _FontManagerJsonProxy FontManagerJsonProxy;