TemplateBundle

TemplateData is a data structure provided by Lynx. It is used to store the data types accepted by Lynx at runtime and can be constructed using either a string or a map type.

Android

fromMap

public static TemplateData fromMap(Map<String, Object> map)

Input Map type data and return the parsed TemplateData object.

Params:

  • map: Map<String, Object>: Map type data;

fromString

public static TemplateData fromString(String json)

Input String type data and return the parsed TemplateData object.

Params:

  • json: String: String type data;

markState

public void markState(String name)

Mark the current TemplateData with the associated dataProcessor name. When this TemplateData is used in UpdateData, the corresponding dataProcessor will be found based on this name for data preprocessing.

Params:

  • name: String: Marked name;

iOS

initWithDictionary

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

Input NSDictionary type data and return the parsed LynxTemplateData object.

Params:

  • dictionary: NSDictionary*: NSDictionary* type data;

initWithJson

- (instancetype)initWithJson:(NSString *)json;

Input NSDictionary type data and return the parsed LynxTemplateData object.

Params:

  • json: NSString*: NSString* type data;

markState

- (void)markState:(NSString *)name;

Mark the current TemplateData with the associated dataProcessor name. When this TemplateData is used in UpdateData, the corresponding dataProcessor will be found based on this name for data preprocessing.

Params:

  • name: NSString*: Marked name;

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.