|
1 | 1 | LitJSON |
2 | 2 | ======= |
3 | 3 |
|
| 4 | +[](https://www.nuget.org/packages/LitJson) [](https://www.myget.org/gallery/litjson) |
| 5 | + |
4 | 6 | A *.Net* library to handle conversions from and to JSON (JavaScript Object |
5 | 7 | Notation) strings. |
6 | 8 |
|
7 | | -[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._ |
8 | 12 |
|
9 | 13 |
|
10 | | -## Compiling |
| 14 | +## Continuous integration |
| 15 | + |
| 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) | |
11 | 20 |
|
12 | | -See the files under the `build` directory. |
13 | 21 |
|
14 | | -### Using GNU Make |
| 22 | +## Compiling |
15 | 23 |
|
16 | | -Change directory to `build/make/` and run `make` from it. This tries to use |
17 | | -the `gmcs` compiler by default. Feel free to open the `Makefile` and tweak |
18 | | -it according to your needs. |
| 24 | +Code can be compiled using .NET CLI or by launching the bootstrappers in the root of the repository. |
19 | 25 |
|
20 | | -### Using other tools |
| 26 | +#### Windows |
21 | 27 |
|
22 | | -Currently, LitJSON doesn't have any other auxiliary files for compiling this |
23 | | -library with other tools. |
| 28 | +```powershell |
| 29 | +./build.ps1 |
| 30 | +``` |
24 | 31 |
|
25 | | -If you want to contribute your own solutions to compile it with tools like |
26 | | -*NAnt* or *MSBuild*, that would be most appreciated. Please create those |
27 | | -auxiliary files under the path `build/some-tool`. Thanks. |
| 32 | +#### Linux / OS X |
28 | 33 |
|
29 | | -## Tests |
| 34 | +```console |
| 35 | +./build.sh |
| 36 | +``` |
| 37 | + |
| 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 |
30 | 52 |
|
31 | 53 | This library comes with a set of unit tests using the [NUnit][nunit] |
32 | 54 | framework. |
33 | 55 |
|
34 | | -If you have [pkg-config][pkg-config] in your system, and the *Mono* suite |
35 | | -provides the `mono-nunit.pc` file, you can try running these tests by running |
36 | | -`make test` from the `build/make` directory. |
| 56 | +## Using LitJSON from an application |
37 | 57 |
|
38 | | -You can specify which `pkg-config` is invoked by passing a `PKG_CONFIG` |
39 | | -variable to `make test`. This is useful when you have mutiple conflicting |
40 | | -`pkg-config`s on your system and need to select the correct one (i.e. to |
41 | | -avoid conflicts with Homebrew on Mac OSX). |
| 58 | +#### Package manager |
42 | 59 |
|
43 | | -Example of running the tests on Mac OSX: |
| 60 | +```PowerShell |
| 61 | +Install-Package LitJson -Version 0.10.0 |
| 62 | +``` |
44 | 63 |
|
45 | | -```bash |
46 | | -# In litjson/ directory |
47 | | -$ cd build/make |
48 | | -$ make PKG_CONFIG=/Library/Frameworks/Mono.framework/Commands/pkg-config test |
| 64 | +#### .NET CLI |
| 65 | + |
| 66 | +```PowerShell |
| 67 | +dotnet add package LitJson --version 0.10.0 |
49 | 68 | ``` |
50 | 69 |
|
51 | | -## Using LitJSON from an application |
| 70 | +#### Paket CLI |
52 | 71 |
|
53 | | -Reference the `LitJson.dll` file when compiling your code. For a link to |
54 | | -download this file, see the *Download* section in the project's |
55 | | -[website][litjson]. |
| 72 | +```PowerShell |
| 73 | +paket add LitJson --version 0.10.0 |
| 74 | +``` |
56 | 75 |
|
57 | 76 | Alternatively, just copy the whole tree of files under `src/LitJSON` to your |
58 | 77 | own project's source tree and integrate it with your development environment. |
59 | 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 | + |
60 | 104 | ## License |
61 | 105 |
|
62 | 106 | [Unlicense][unlicense] (public domain). |
63 | 107 |
|
64 | | - |
65 | | -[litjson]: http://lbv.github.io/litjson/ |
| 108 | +[mygetgallery]: [https://www.myget.org/gallery/litjson] |
| 109 | +[litjson]: [unlicense](http://unlicense.org/ |
66 | 110 | [nunit]: http://www.nunit.org/ |
67 | 111 | [pkg-config]: http://www.freedesktop.org/wiki/Software/pkg-config |
68 | 112 | [unlicense]: http://unlicense.org/ |
0 commit comments