36 | $for(include-before)$
37 | $include-before$
38 | $endfor$
39 | $if(title)$
40 |
41 | $title$
42 | $for(author)$
43 | $author$
44 | $endfor$
45 | $if(date)$
46 | $date$
47 | $endif$
48 |
49 | $endif$
50 | $if(toc)$
51 |
54 | $endif$
55 | $body$
56 | $for(include-after)$
57 | $include-after$
58 | $endfor$
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/benchmarks/BmNewtonsoftImport.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | using System.Collections;
4 | using System.IO;
5 |
6 |
7 | namespace LitJson.Benchmarks
8 | {
9 | public class BenchmarkNewtonsoft
10 | {
11 | [Benchmark]
12 | public static void NewtonsoftConversionToGenericObject ()
13 | {
14 | for (int i = 0; i < Common.Iterations; i++) {
15 | JavaScriptObject art = (JavaScriptObject)
16 | JavaScriptConvert.DeserializeObject (
17 | Common.PersonJson, typeof(JavaScriptObject));
18 |
19 | TextWriter.Null.Write(art["Name"]);
20 | }
21 | }
22 |
23 | [Benchmark]
24 | public static void NewtonsoftConversionToHashtable ()
25 | {
26 | for (int i = 0; i < Common.Iterations; i++) {
27 | Hashtable art = (Hashtable)
28 | JavaScriptConvert.DeserializeObject (
29 | Common.PersonJson, typeof(Hashtable));
30 |
31 | TextWriter.Null.Write(art["Name"]);
32 | }
33 | }
34 |
35 | [Benchmark]
36 | public static void NewtonsoftConversionToObject ()
37 | {
38 | for (int i = 0; i < Common.Iterations; i++) {
39 | Person art = (Person)
40 | JavaScriptConvert.DeserializeObject (
41 | Common.PersonJson, typeof(Person));
42 |
43 | TextWriter.Null.Write(art.ToString ());
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Docs/template-web.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
37 | $for(include-before)$
38 | $include-before$
39 | $endfor$
40 | $if(title)$
41 |
42 | $title$
43 | $for(author)$
44 | $author$
45 | $endfor$
46 | $if(date)$
47 | $date$
48 | $endif$
49 |
50 | $endif$
51 | $if(toc)$
52 |
55 | $endif$
56 | $body$
57 | $for(include-after)$
58 | $include-after$
59 | $endfor$
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to