mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
Updated docs to include value parsing
This commit is contained in:
@@ -241,8 +241,8 @@
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../read/" title="Read" class="md-nav__link">
|
||||
Read
|
||||
<a href="../path_expressions/" title="Path Expressions" class="md-nav__link">
|
||||
Path Expressions
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -253,8 +253,20 @@
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../path_expressions/" title="Path Expressions" class="md-nav__link">
|
||||
Path Expressions
|
||||
<a href="../value_parsing/" title="Value Parsing" class="md-nav__link">
|
||||
Value Parsing
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../read/" title="Read" class="md-nav__link">
|
||||
Read
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -425,7 +437,7 @@
|
||||
|
||||
<h1>Convert</h1>
|
||||
|
||||
<h3 id="yaml-to-json">Yaml to Json<a class="headerlink" href="#yaml-to-json" title="Permanent link">¶</a></h3>
|
||||
<h2 id="yaml-to-json">Yaml to Json<a class="headerlink" href="#yaml-to-json" title="Permanent link">¶</a></h2>
|
||||
<p>To convert output to json, use the --tojson (or -j) flag. This is supported by all commands.</p>
|
||||
<p>Each matching yaml node will be converted to json and printed out on a separate line.</p>
|
||||
<p>Given a sample.yaml file of:</p>
|
||||
@@ -457,7 +469,7 @@ bab:
|
||||
{"c":5}
|
||||
</code></pre>
|
||||
|
||||
<h3 id="json-to-yaml">Json to Yaml<a class="headerlink" href="#json-to-yaml" title="Permanent link">¶</a></h3>
|
||||
<h2 id="json-to-yaml">Json to Yaml<a class="headerlink" href="#json-to-yaml" title="Permanent link">¶</a></h2>
|
||||
<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