Table of Contents

Class DefaultLocalizerJsonSerializer

Namespace
TimeCockpit.Data.Localization.Default
Assembly
TimeCockpit.Data.dll

Class holding static methods to wrap a localizer into a JObject and back again.

public static class DefaultLocalizerJsonSerializer
Inheritance
Object
DefaultLocalizerJsonSerializer
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Methods

FromJson(DefaultLocalizer, JObject, String)

Reads a localizer instance from a json root object using a specific culture. The localizations found in the json object will be stored as the culture.

public static void FromJson(DefaultLocalizer localizer, JObject root, string culture)

Parameters

localizer DefaultLocalizer

the localizer to save to.

root JObject

the root object containing the localization info for the specific culture.

culture String

the culture that is serialized.

ToJson(DefaultLocalizer, String)

Writes the strings of a given culture to a json object.

public static JObject ToJson(DefaultLocalizer localizer, string culture)

Parameters

localizer DefaultLocalizer

the localizer to write.

culture String

the culture to use.

Returns

JObject

returns the object containing the localization information for the given culture.