jeremyfa / yaml.js

Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add space after each object

vinodkolla opened this issue · comments

I am using yaml-js to auto-format the yaml files. I have a big JSON file with chunks of objects in it. When i convert them to YAML format, i want to add space after each json object. Example:

{
  person1: {
    name: "Foo"
  },
  person2: {
     name: "Bar"
  }
}

When this is converted to YAML, it formats as

person1:
    name: "Foo"
person2:
   name: "Bar"

Expected output is :

person1:
    name: "Foo"

person2:
   name: "Bar"