mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
Added doco regarding values starting with hyphens
This commit is contained in:
@@ -323,7 +323,7 @@
|
||||
|
||||
<h1>Convert</h1>
|
||||
|
||||
<h3 id="yaml-to-json">Yaml to Json</h3>
|
||||
<h3 id="yaml-to-json">Yaml to Json<a class="headerlink" href="#yaml-to-json" title="Permanent link">¶</a></h3>
|
||||
<p>To convert output to json, use the --tojson (or -j) flag. This can be used with any command.</p>
|
||||
<p>Given a sample.yaml file of:</p>
|
||||
<pre><code class="yaml">b:
|
||||
@@ -338,7 +338,7 @@
|
||||
<pre><code class="json">{"b":{"c":2}}
|
||||
</code></pre>
|
||||
|
||||
<h3 id="json-to-yaml">Json to Yaml</h3>
|
||||
<h3 id="json-to-yaml">Json to Yaml<a class="headerlink" href="#json-to-yaml" title="Permanent link">¶</a></h3>
|
||||
<p>To read in json, just pass in a json file instead of yaml, it will just work :)</p>
|
||||
<p>e.g given a json file</p>
|
||||
<pre><code class="json">{"a":"Easy! as one two three","b":{"c":2,"d":[3,4]}}
|
||||
|
||||
Reference in New Issue
Block a user