|
1 | 1 | LitJSON |
2 | 2 | ======= |
3 | 3 |
|
4 | | -[](https://ci.appveyor.com/project/litjson/litjson/branch/develop) |
| 4 | +[](https://www.nuget.org/packages/LitJson) [](https://www.myget.org/gallery/litjson) |
5 | 5 |
|
6 | 6 | A *.Net* library to handle conversions from and to JSON (JavaScript Object |
7 | 7 | Notation) strings. |
8 | 8 |
|
9 | | -[Project website][litjson]. |
| 9 | +> _It's quick and lean, without external dependencies. |
| 10 | +> Just a few classes so easily embeddable in your own code or a very small assembly to ship with your code. |
| 11 | +> The code is highly portable, which in general makes it easy to adapt for new platforms._ |
10 | 12 |
|
11 | 13 |
|
12 | | -## Compiling |
13 | | - |
14 | | -See the files under the `build` directory. |
15 | | - |
16 | | -### Using GNU Make |
| 14 | +## Continuous integration |
17 | 15 |
|
18 | | -Change directory to `build/make/` and run `make` from it. This tries to use |
19 | | -the `gmcs` compiler by default. Feel free to open the `Makefile` and tweak |
20 | | -it according to your needs. |
| 16 | +| Build server | Platform | Build status | |
| 17 | +|-----------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 18 | +| AppVeyor | Windows | [](https://ci.appveyor.com/project/litjson/litjson/branch/develop) | |
| 19 | +| Travis | Linux / OS X | [](https://travis-ci.org/LitJSON/litjson) | |
21 | 20 |
|
22 | | -### Using other tools |
23 | 21 |
|
24 | | -Currently, LitJSON doesn't have any other auxiliary files for compiling this |
25 | | -library with other tools. |
| 22 | +## Compiling |
26 | 23 |
|
27 | | -If you want to contribute your own solutions to compile it with tools like |
28 | | -*NAnt* or *MSBuild*, that would be most appreciated. Please create those |
29 | | -auxiliary files under the path `build/some-tool`. Thanks. |
| 24 | +Code can be compiled using .NET CLI or by launching the bootstrappers in the root of the repository. |
30 | 25 |
|
31 | | -## Tests |
| 26 | +#### Windows |
32 | 27 |
|
33 | | -This library comes with a set of unit tests using the [NUnit][nunit] |
34 | | -framework. |
| 28 | +```powershell |
| 29 | +./build.ps1 |
| 30 | +``` |
35 | 31 |
|
36 | | -If you have [pkg-config][pkg-config] in your system, and the *Mono* suite |
37 | | -provides the `mono-nunit.pc` file, you can try running these tests by running |
38 | | -`make test` from the `build/make` directory. |
| 32 | +#### Linux / OS X |
39 | 33 |
|
40 | | -You can specify which `pkg-config` is invoked by passing a `PKG_CONFIG` |
41 | | -variable to `make test`. This is useful when you have mutiple conflicting |
42 | | -`pkg-config`s on your system and need to select the correct one (i.e. to |
43 | | -avoid conflicts with Homebrew on Mac OSX). |
| 34 | +```console |
| 35 | +./build.sh |
| 36 | +``` |
44 | 37 |
|
45 | | -Example of running the tests on Mac OSX: |
| 38 | +#### Prerequisites |
| 39 | + |
| 40 | +The bootstrappers will (locally in repo) |
| 41 | + |
| 42 | + * Fetch and install .NET Core CLI / SDK version needed to compile LitJSON. |
| 43 | + * Fetch and install Cake runner |
| 44 | + * Execute build script with supplied target (`--target=[Target]`) or by default |
| 45 | + 1. Clean previous artifacts |
| 46 | + 1. Restore build dependencies from NuGet |
| 47 | + 1. Build |
| 48 | + 1. Run unit tests |
| 49 | + 1. Create NuGet package |
| 50 | + |
| 51 | +#### Testing |
46 | 52 |
|
47 | | -```bash |
48 | | -# In litjson/ directory |
49 | | -$ cd build/make |
50 | | -$ make PKG_CONFIG=/Library/Frameworks/Mono.framework/Commands/pkg-config test |
51 | | -``` |
| 53 | +This library comes with a set of unit tests using the [NUnit][nunit] |
| 54 | +framework. |
52 | 55 |
|
53 | 56 | ## Using LitJSON from an application |
54 | 57 |
|
55 | 58 | #### Package manager |
56 | 59 |
|
57 | 60 | ```PowerShell |
58 | | -Install-Package LitJson -Version 0.9.0 |
| 61 | +Install-Package LitJson -Version 0.10.0 |
59 | 62 | ``` |
60 | 63 |
|
61 | 64 | #### .NET CLI |
62 | 65 |
|
63 | 66 | ```PowerShell |
64 | | -dotnet add package LitJson --version 0.9.0 |
| 67 | +dotnet add package LitJson --version 0.10.0 |
65 | 68 | ``` |
66 | 69 |
|
67 | 70 | #### Paket CLI |
68 | 71 |
|
69 | 72 | ```PowerShell |
70 | | -paket add LitJson --version 0.9.0 |
| 73 | +paket add LitJson --version 0.10.0 |
71 | 74 | ``` |
72 | 75 |
|
73 | | - |
74 | 76 | Alternatively, just copy the whole tree of files under `src/LitJSON` to your |
75 | 77 | own project's source tree and integrate it with your development environment. |
76 | 78 |
|
| 79 | +#### Requirements |
| 80 | + |
| 81 | +LitJSON currently targets and supports |
| 82 | +* .NET Standard 2.0 |
| 83 | +* .NET Standard 1.5 |
| 84 | +* .NET Framework 4.5 and above |
| 85 | +* Mono 4.4.2 and above |
| 86 | + |
| 87 | +But the code is very portable and can even be compiled under SQLCLR, which [WCOMAB/SqlServerSlackAPI](https://github.com/WCOMAB/SqlServerSlackAPI) is an example of. |
| 88 | + |
| 89 | +#### Prereleases |
| 90 | + |
| 91 | +Each merge to develop is published to our NuGet feed on [MyGet](mygetgallery). |
| 92 | + |
| 93 | +## Contributing |
| 94 | + |
| 95 | +So you’re thinking about contributing to LitJSON? Great! It’s **really** appreciated. |
| 96 | + |
| 97 | +* Create an issue |
| 98 | +* Fork the repository. |
| 99 | +* Create a feature branch from `develop` to work in. |
| 100 | +* Make your feature addition or bug fix. |
| 101 | +* Don't forget the unit tests. |
| 102 | +* Send a pull request. |
| 103 | + |
77 | 104 | ## License |
78 | 105 |
|
79 | 106 | [Unlicense][unlicense] (public domain). |
80 | 107 |
|
81 | | - |
| 108 | +[mygetgallery]: [https://www.myget.org/gallery/litjson] |
82 | 109 | [litjson]: [unlicense](http://unlicense.org/ |
83 | 110 | [nunit]: http://www.nunit.org/ |
84 | 111 | [pkg-config]: http://www.freedesktop.org/wiki/Software/pkg-config |
|
0 commit comments