For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-native-api/template-data/from-string.md.
Lynx
  • 简体中文
  • fromString

    输入 json 格式的数据,并返回解析后的 TemplateData 对象。

    语法

    Android

    public static TemplateData fromString(String json);

    参数说明

    • json: json 格式的 String 类型数据。

    返回值

    • json 构建的 TemplateData

    iOS

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

    参数说明

    • json: json 格式的 NSString* 类型数据。

    返回值

    • json 构建的 TemplateData

    Desktop (C++)

    Desktop public API 直接通过 JSON 字符串构造 LynxTemplateData

    auto data = std::make_shared<lynx::pub::LynxTemplateData>(json);

    参数说明

    • json: 用于创建模板数据的 JSON 字符串。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。