yaml-utils

Downloads18
Subscribe
0
Bookmark
0
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Issues
Dependants

What's new in this version

  • strip wrapping quotes from JSON keys

YAML Utils

Usage

Very simple ObjectScript YAML-to-JSON converter:

set obj = ##class(YAML.Utils).FileToJSON("C:\temp\test.yaml", .sc)
zwrite obj

Additional StringToJSON() and StreamToJSON() methods do exactly what you'd expect them to (I hope!)

Note: I first put the script in place so I could quickly test https://github.com/lscalese/OpenAPI-Client-Gen on my own YAML Swagger def in the context of the Interoperability contest, so that's really the amount of testing it's seen. Those 5k lines of YAML aren't too bad to get started, but happy to accept PRs to make it more robust for other real-world YAML.

Installation

Easy installation using ZPM (pending approval):

USER> zpm
zpm: USER> install yaml-utils

[yaml-utils] Reload START
[yaml-utils] Reload SUCCESS
[yaml-utils] Module object refreshed.
[yaml-utils] Validate START
[yaml-utils] Validate SUCCESS
[yaml-utils] Compile START
[yaml-utils] Compile SUCCESS
[yaml-utils] Activate START
[yaml-utils] Configure START
[yaml-utils] Configure SUCCESS
[yaml-utils] Activate SUCCESS

Otherwise just load the sole YAML.Utils class and start converting.

IPM installation
zpm "install yaml-utils"
Rating
4.5 (2)
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
Tags
Info
Version
0.1.3
Last updated
2023-02-20
Repository
Open
Documentation
Open
License
Link