1
0
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:
Mike Farah
2017-05-03 08:11:26 +10:00
parent ec25886528
commit 69e6bb354d
8 changed files with 67 additions and 25 deletions

View File

@@ -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">&para;</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">{&quot;b&quot;:{&quot;c&quot;: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">&para;</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">{&quot;a&quot;:&quot;Easy! as one two three&quot;,&quot;b&quot;:{&quot;c&quot;:2,&quot;d&quot;:[3,4]}}