Skip to content

Commit

Permalink
Fix structure
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorNicollet committed Nov 26, 2012
1 parent 98883c7 commit a2e40be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ocaml/cStatic.ml
Expand Up @@ -13,8 +13,7 @@ let books = OhmPaging.Book.([
"tutorials/run.htm", "Module Ohm.Run" ;
"tutorials/action.htm", "Adding new pages" ;
"tutorials/html.htm", "HTML templates" ;
"tutorials/ohm.htm", "JSON serialization" ;
"tutorials/couch.htm", "Database storage" ;
"tutorials/json.htm", "JSON serialization" ;
]
])

Expand Down
4 changes: 2 additions & 2 deletions static/tutorials/json.htm
@@ -1,6 +1,6 @@
<p class="abstract">Understand the way Ohm helps you serialize data as JSON for sending to both the CouchDB database and the client-side code.</p>

<p><a href="http://www.json.org/">JSON is a standard format for data serialization. A JSON value can be one of the following:</p>
<p><a href="http://www.json.org/">JSON</a> is a standard format for data serialization. A JSON value can be one of the following:</p>

<ul>
<li>A number, such as <code>12</code> or <code>3.14</code>.</li>
Expand Down Expand Up @@ -83,7 +83,7 @@ <h3>JSON Formats</h3>

<p>In practice, you should never use the generated functions <code>t_of_json</code> and <code>json_of_t</code> yourself. Most Ohm modules and plugins expect you to provide them with either a format module, or a formatter value. Even when working on your own, using format modules is a superior way of doing things.</p>

<p>A format module provides a type <code>t<.code> along with a handful of ways to serialize and unserialize a type. It includes functions <code>of_json</code> and <code>to_json</code> (which let you use the formatter module as part of another type definition), function <code>of_json_safe</code> which returns <code>None</code> if parsing fails (instead of an exception), and a formatter value <code>fmt</code></p>
<p>A format module provides a type <code>t</code> along with a handful of ways to serialize and unserialize a type. It includes functions <code>of_json</code> and <code>to_json</code> (which let you use the formatter module as part of another type definition), function <code>of_json_safe</code> which returns <code>None</code> if parsing fails (instead of an exception), and a formatter value <code>fmt</code></p>

<p>Building a format module is simple : use functor <code>Ohm.Fmt.Make</code></p>

Expand Down

0 comments on commit a2e40be

Please sign in to comment.