Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hjson-cli preserve comments #73

@wfabianrs

Description

@wfabianrs

When using the json-cli tool, it removes comments from formatted code.

Using the following example file:

/*
A multi-line
comment
*/
{
  employer: “Yambee”  // inline comment
  address: “98563 Bobwhite Trail” # another inline comment
  description: “bibendum morbi non quam nec dui luctus rutrum nulla tellus in”
}

Running hjson-cli test.hjson returns:

{
  address: 98563 Bobwhite Trail
  description: bibendum morbi non quam nec dui luctus rutrum nulla tellus in
  employer: Yambee
}

Removing the comments written above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions