往期推文全新看点(文中附带全新鸿蒙5.0全栈学习笔录)

✏️ 鸿蒙应用开发与鸿蒙系统开发哪个更有前景?

✏️ 嵌入式开发适不适合做鸿蒙南向开发?看完这篇你就了解了~

✏️ 对于大前端开发来说,转鸿蒙开发究竟是福还是祸?

✏️ 鸿蒙岗位需求突增!移动端、PC端、IoT到底该怎么选?

✏️ 市场巨变,移动开发行业即将迎来“第二春”?

✏️ 记录一场鸿蒙开发岗位面试经历~

✏️ 持续更新中……


简介

snakeyaml语言解析功能库。 支持: Parse & Stringify, YAML Documents等。

下载安装

ohpm install yaml@1.10.2

使用说明

YAMI.stringify

YAML.stringify([true, false, 'maybe', null])
// `- true
// - false
// - maybe
// - null
// `

YAML.parse

YAML.parse('3.14159')
// 3.14159

Documents

const doc = new Document(['some', 'values', { balloons: 99 }])
doc.commentBefore = ' A commented document'

String(doc)
// # A commented document
//
// - some
// - values
// - balloons: 99

接口说明

  1. parse解析 YAML.parse()
  2. stringify解析 YAML.stringify()
  3. parseDocument解析 YAML.parseDocument()
  4. Document解析 YAML.Document

目录结构

|---- snakeyaml 
|     |---- entry  # 示例代码文件夹
|     |---- README.md     # 安装使用方法
|     |---- README_zh.md  # 安装使用方法            

Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐