Table of Contents

Method FromJson

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

FromJson(string)

Creates a new MetadataCollection from a flat JSON object string, mapping each property to a metadata entry. Property values are converted to their string representation: JSON strings are taken verbatim, true/false become "true"/"false", null becomes an empty string, and numbers, arrays, and nested objects are kept as their raw JSON text. Properties with an empty name are skipped.

public static MetadataCollection FromJson(string json)

Parameters

json string

The JSON object string to parse. A null, empty, or non-object JSON value yields an empty collection.

Returns

MetadataCollection

A new MetadataCollection populated from the supplied JSON.

Exceptions

JsonException

Thrown when json is not valid JSON.

Share