yamlutil

Utility libraries for YAML in Go. Initial functionality is to get line and column numbers for JSON pointers, as used in OpenAPI Spec.

MIT License

Stars
2
Committers
2

YAML Utility for Go

Overview

The yamlutil package provides a collection of Go utilities for YAML.

  1. The primary feature is the GetNodeJsonSchemaPath() function which returns a *yaml.Node for a pre-parsed JSON Schema pointer path. The primary use case is to get line numbers of linters using JSON Schema pointer to access a YAML file, e.g. OpenAPI specification files.
  2. A secondary feature is the ReadFileAsJson() function which will read a YAML file and convert it to JSON using github.com/ghodss/yaml.

Installation

$ go get github.com/grokify/yamlutil

Contributing

Features, Issues, and Pull Requests are always welcome.

To contribute:

  1. Fork it ( http://github.com/grokify/yamlutil/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please report issues and feature requests on Github.