Class DefaultLocalizerJsonSerializer
- Assembly
- TimeCockpit.Data.dll
Class holding static methods to wrap a localizer into a JObject and back again.
public static class DefaultLocalizerJsonSerializer
- Inheritance
-
ObjectDefaultLocalizerJsonSerializer
- 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
localizerDefaultLocalizerthe localizer to save to.
rootJObjectthe root object containing the localization info for the specific culture.
cultureStringthe 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
localizerDefaultLocalizerthe localizer to write.
cultureStringthe culture to use.
Returns
- JObject
returns the object containing the localization information for the given culture.