JavaScript YAML 解析器 [英] JavaScript YAML Parser

查看:38
本文介绍了JavaScript YAML 解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个 JavaScript YAML 解析器,它将 YAML 转换为 HTML 页面中可用的内容.我已经在 Github (https://github.com/visionmedia/js-yaml) 上尝试过这个版本,但它看起来就像它只适用于 node.js

I am looking for a JavaScript YAML parser which converts the YAML into something usable within a HTML page. I've tried this version on Github (https://github.com/visionmedia/js-yaml) but it looks like it only works with node.js

我应该使用哪些库,是否有任何示例代码来显示示例用法?

Which libraries should I be using and is there any sample code to show example usage?

推荐答案

JS-YAML解析器在浏览器中工作.这是一个在线演示:https://nodeca.github.io/js-yaml.不过,它的主要目标是 node.js,浏览器版本只是为了好玩:)

JS-YAML parser works in browser. Here is an online demonstration : https://nodeca.github.io/js-yaml. Though, it's primary goal is node.js, and browser version was done just for fun :)

这篇关于JavaScript YAML 解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆