-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,7 +242,14 @@ <h2> | |
<li class="entry-summary"> | ||
<a href="#h_from_json(json:String%7CIO)-instance-method" class="signature"><strong>#h_from_json</strong>(json : String | IO)</a> | ||
|
||
<div class="summary"><p>Returns a <code>Hash</code> from a JSON input.</p></div> | ||
<div class="summary"><p>Returns a <em>json</em> <code>Hash</code> from a JSON input.</p></div> | ||
|
||
</li> | ||
|
||
<li class="entry-summary"> | ||
<a href="#h_from_json!(json:String%7CIO)-instance-method" class="signature"><strong>#h_from_json!</strong>(json : String | IO)</a> | ||
|
||
<div class="summary"><p>Returns a <em>json</em> <code>Hash</code> from a JSON input.</p></div> | ||
|
||
</li> | ||
|
||
|
@@ -451,7 +458,7 @@ <h2> | |
|
||
<div class="doc"> | ||
|
||
<p>Returns a <code>Hash</code> from a JSON input. | ||
<p>Returns a <em>json</em> <code>Hash</code> from a JSON input. | ||
The return type is a tuple with a bool as a first argument indicating | ||
that the <code>JSON.parse</code> has been processed successfully or not and the 2nd | ||
argument is the <em>json</em> Hash.</p> | ||
|
@@ -465,6 +472,28 @@ <h2> | |
</div> | ||
</div> | ||
|
||
<div class="entry-detail" id="h_from_json!(json:String|IO)-instance-method"> | ||
<div class="signature"> | ||
|
||
def <strong>h_from_json!</strong>(json : String | IO) | ||
|
||
<a class="method-permalink" href="#h_from_json!(json:String%7CIO)-instance-method">#</a> | ||
</div> | ||
|
||
<div class="doc"> | ||
|
||
<p>Returns a <em>json</em> <code>Hash</code> from a JSON input. | ||
Same as <code><a href="../Check/CheckableStatic.html#h_from_json(json:String%7CIO)-instance-method">#h_from_json</a></code>, except that this method raises a <code>JSON::ParseException</code> if the conversion fails.</p> | ||
|
||
<pre><code class="language-crystal">user_h <span class="o">=</span> <span class="t">User</span>.h_from_json!(json) <span class="c"># => {"username" => "Bob", "email" => "[email protected]"}</span></code></pre> | ||
</div> | ||
|
||
<br/> | ||
<div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="entry-detail" id="map_json_keys:Hash(String,String)-instance-method"> | ||
<div class="signature"> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: validator | ||
version: 1.10.1 | ||
version: 1.11.0 | ||
crystal: ">= 0.35.0" | ||
license: MIT | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters