Skip to content

Commit

Permalink
v1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolab committed Jun 19, 2021
1 parent 368edf8 commit 39b3e04
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 6 deletions.
33 changes: 31 additions & 2 deletions docs/Check/CheckableStatic.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand All @@ -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"># =&gt; {&quot;username&quot; =&gt; &quot;Bob&quot;, &quot;email&quot; =&gt; &quot;user@example.com&quot;}</span></code></pre>
</div>

<br/>
<div>

</div>
</div>

<div class="entry-detail" id="map_json_keys:Hash(String,String)-instance-method">
<div class="signature">

Expand Down
12 changes: 11 additions & 1 deletion docs/Check/ValidationError.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h1 class="type-name">
</h1>


<ul class="superclass-hierarchy"><li class="superclass"><a href="../Check/ValidationError.html">Check::ValidationError</a></li><li class="superclass">Exception</li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
<ul class="superclass-hierarchy"><li class="superclass"><a href="../Check/ValidationError.html">Check::ValidationError</a></li><li class="superclass"><a href="../Validator/Error.html">Validator::Error</a></li><li class="superclass">Exception</li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>



Expand Down Expand Up @@ -249,6 +249,16 @@ <h2>
















Expand Down
14 changes: 14 additions & 0 deletions docs/Validator/Error.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ <h2>



<h2>
<a id="direct-known-subclasses" class="anchor" href="#direct-known-subclasses">
<svg class="octicon-link" aria-hidden="true">
<use href="#octicon-link"/>
</svg>
</a>
Direct Known Subclasses
</h2>
<ul class="other-types-list">

<li class="other-type"><a href="../Check/ValidationError.html">Check::ValidationError</a></li>

</ul>




Expand Down
2 changes: 1 addition & 1 deletion docs/index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/search-index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shard.yml
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

Expand Down
1 change: 1 addition & 0 deletions src/check.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# information and documentation: https://github.com/Nicolab/crystal-validator
# ------------------------------------------------------------------------------

require "./validator"
require "./checkable"

# Standalone check module that provides a practical workflow for validations.
Expand Down

0 comments on commit 39b3e04

Please sign in to comment.