Skip to content

Commit 52d96c7

Browse files
committed
Merge branch 'release/0.11.0'
* release/0.11.0: Release notes migrated to litjson.net Removed make in favor of just supporting Cake build script (GH-69) Add .NET 3.5 and .NET 4.0 targets * Added .NET 3.5 target * Added .NET 4.0 target * Added source link * Added source to symbols package * Added NuGet package description * Added CLRF fix for AppVeyor * Fixes #69
2 parents 0f970e2 + 468866b commit 52d96c7

7 files changed

Lines changed: 47 additions & 292 deletions

File tree

NEWS

Lines changed: 1 addition & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -1,199 +1 @@
1-
LitJSON 0.9.0
2-
=============
3-
4-
2014-09-08
5-
6-
## Additions
7-
8-
* Added `JsonData.Keys` property, with type `ICollection<string>`.
9-
10-
## Bug fixes
11-
12-
* Handle nullable types (Issue #3)
13-
* Parse UInt64 numbers correctly
14-
15-
## Other changes
16-
17-
* Allow specifying a custom PKG_CONFIG in build/make.
18-
19-
## Contributors for this release
20-
21-
- Michael Bartnett (@michaelbartnett)
22-
- @MickeyKim
23-
24-
25-
- - -
26-
27-
28-
LitJSON 0.7.0
29-
=============
30-
31-
2013-04-26
32-
33-
General changes and improvements:
34-
35-
* Simplified the building mechanism. Dropped the entire autotools
36-
infrastructure, and instead added a single Makefile to compile the project
37-
and run the tests with *GNU make*.
38-
39-
* Added `SkipNonMembers` property to `JsonReader`. When active, it allows to
40-
parse JSON data using `JsonMapper.ToObject<T>` and ignore any properties
41-
not available in the type `T`. Its default value is `true`.
42-
43-
* Started moving the documentation into Markdown format.
44-
45-
* Added a new section to the QuickStart Guide, regarding customisation of
46-
the library's behaviour.
47-
48-
Bug fixes:
49-
50-
* Convert `null` properties properly in `JsonData.ToJson`.
51-
52-
* Read nested arrays in `JsonMapper.ToObject` and `JsonMapper.ToObject<T>`
53-
correctly.
54-
55-
Contributors for this release:
56-
57-
- whoo24
58-
- Christopher Dummy
59-
60-
61-
LitJSON 0.5.0
62-
=============
63-
64-
2007-10-04
65-
66-
New features and improvements:
67-
68-
* The JsonRader class now has two properties to control the reading of data
69-
from an input stream: EndOfInput and EndOfJson. The latter becomes
70-
true whenever a complete piece of JSON text has been read, while the
71-
former is a flag that becomes true when the stream itself reaches the end.
72-
This way, reading multiple JSON texts from the same input stream is
73-
straightforward.
74-
75-
* Added new base importers in JsonMapper for reading numeric values
76-
correctly into float and double members.
77-
78-
* Now Enum's can be imported/exported as numeric values.
79-
80-
* JsonData implements the IEquatable<T> interface now.
81-
82-
83-
API changes:
84-
85-
The following types are new:
86-
enum JsonType
87-
88-
The following methods are new:
89-
IJsonWrapper.GetJsonType()
90-
IJsonWrapper.SetJsonType()
91-
92-
The following properties are new:
93-
JsonReader.EndOfInput
94-
95-
96-
Bug fixes:
97-
98-
* Correctly import/export properties that are read-only or write-only.
99-
100-
* Correctly convert null values when adding them as array elements or
101-
properties to a JsonData instance.
102-
103-
* Fixed conversion of empty JSON objects and arrays.
104-
105-
106-
Thanks to all the contributors that reported problems and suggested fixes
107-
for this release:
108-
Colin Alworth
109-
Ralf Callenberg
110-
andi
111-
112-
113-
LitJSON 0.3.0
114-
=============
115-
116-
2007-08-15
117-
118-
New features and improvements:
119-
120-
* Exporters and importers.
121-
Custom conversions using the JsonMapper class can be made through
122-
importers and exporters. These are delegates that tell the library how to
123-
perform conversions between non-basic types (i.e. not string, int, long,
124-
double or boolean) and JSON. There are base and custom
125-
exporters/importers. The base exporters and importers are built-in
126-
delegates that currently handle simple conversions between JSON and the
127-
following value types:
128-
129-
byte
130-
char
131-
DateTime
132-
decimal
133-
sbyte
134-
short
135-
ushort
136-
uint
137-
ulong
138-
139-
Custom exporters and importers can be defined through
140-
JsonMapper.RegisterExporter and JsonMapper.RegisterImporter, and they
141-
override the built-in conversions.
142-
143-
* Improved performance of JsonMapper.ToJson()
144-
A static JsonWriter is re-used to reduce the activity in the heap,
145-
improving performance for multiple conversions.
146-
147-
* Allowing extended grammar
148-
The lexer can now accept single-quoted strings, and comments in the
149-
following forms:
150-
151-
// Single-line comment
152-
153-
/*
154-
* Multi-line comment
155-
*/
156-
157-
This way, certain forms of input coming from JavaScript that don't
158-
necessarily conform to the strict JSON grammar are allowed and succesfully
159-
parsed.
160-
161-
A JsonReader can be configured to accept only the strict grammar or the
162-
extended one. These extensions are allowed by default.
163-
164-
* API cleanups and additions.
165-
The following members are new:
166-
167-
JsonData.Count
168-
JsonMapper.RegisterExporter()
169-
JsonMapper.RegisterImporter()
170-
JsonMapper.UnregisterExporters()
171-
JsonMapper.UnregisterImporters()
172-
JsonReader.AllowComments
173-
JsonReader.AllowSingleQuotedStrings
174-
JsonWriter.Reset()
175-
176-
The following overloads have been added:
177-
178-
JsonMapper.ToJson(object obj, JsonWriter writer)
179-
JsonMapper.ToObject(JsonReader reader)
180-
181-
The following members have been renamed:
182-
183-
JsonReader.HasReachedEnd is now JsonReader.EndOfJson
184-
185-
186-
Bugs fixed:
187-
188-
* JsonMapper.ToJson() avoids entering an infinite recursion by defining a
189-
max nesting depth.
190-
* The JsonData int indexer now behaves correctly both when it acts as an
191-
array and as an object.
192-
193-
194-
LitJSON 0.1.0
195-
=============
196-
197-
2007-08-09
198-
199-
First release.
1+
News has moved to https://litjson.net/blog/

appveyor.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ build_script:
66
- ps: .\build.ps1 --target="AppVeyor" --verbosity=Verbose
77

88
# Tests
9-
test: off
9+
test: off
10+
11+
init:
12+
- git config --global core.autocrlf true

build.cake

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Task("Clean")
8383
"./test/bin",
8484
"./src/obj",
8585
"./test/obj",
86-
"./artifacts/nuget"
86+
"./artifacts/nuget"
8787
}
8888
);
8989
});
@@ -102,7 +102,8 @@ Task("Build")
102102
DotNetCoreBuild("./LitJSON.sln",
103103
new DotNetCoreBuildSettings {
104104
Configuration = configuration,
105-
MSBuildSettings = msBuildSettings
105+
MSBuildSettings = msBuildSettings,
106+
ArgumentCustomization = args => args.Append("--no-restore")
106107
}
107108
);
108109
});
@@ -114,7 +115,8 @@ Task("Test")
114115
new DotNetCoreTestSettings {
115116
Configuration = configuration,
116117
Framework = "netcoreapp2.0",
117-
NoBuild = true
118+
NoBuild = true,
119+
ArgumentCustomization = args => args.Append("--no-restore")
118120
}
119121
);
120122

@@ -123,16 +125,28 @@ Task("Test")
123125
});
124126
});
125127

128+
Task("Test-SourceLink")
129+
.IsDependentOn("Build")
130+
.WithCriteria(IsRunningOnWindows())
131+
.Does(() => {
132+
foreach(var asssembly in GetFiles("./src/LitJSON/bin/" + configuration + "/**/*.dll"))
133+
{
134+
DotNetCoreTool("./src/LitJSON/LitJSON.csproj", "sourcelink", $"test {asssembly}");
135+
}
136+
});
137+
126138
Task("Package")
127139
.IsDependentOn("Test")
140+
.IsDependentOn("Test-SourceLink")
128141
.Does(() => {
129142
DotNetCorePack("./src/LitJSON/LitJSON.csproj",
130143
new DotNetCorePackSettings {
131144
Configuration = configuration,
132145
NoBuild = true,
133146
IncludeSymbols = true,
134147
OutputDirectory = "./artifacts/nuget",
135-
MSBuildSettings = msBuildSettings
148+
MSBuildSettings = msBuildSettings,
149+
ArgumentCustomization = args => args.Append("--no-restore")
136150
}
137151
);
138152
});
@@ -141,7 +155,6 @@ Task("Upload-AppVeyor-Artifacts")
141155
.IsDependentOn("Package")
142156
.WithCriteria(AppVeyor.IsRunningOnAppVeyor)
143157
.Does(() => {
144-
145158
foreach(var artifact in GetFiles("./artifacts/**/*.*"))
146159
{
147160
AppVeyor.UploadArtifact(artifact);
@@ -165,7 +178,7 @@ Task("Publish-MyGet")
165178
if(string.IsNullOrEmpty(apiUrl)) {
166179
throw new InvalidOperationException("Could not resolve MyGet API url.");
167180
}
168-
181+
169182
foreach(var package in (GetFiles("./artifacts/nuget/*.nupkg") - GetFiles("./artifacts/nuget/*.symbols.nupkg")))
170183
{
171184
DotNetCoreNuGetPush(package.FullPath,
@@ -194,7 +207,7 @@ Task("Publish-NuGet")
194207
if(string.IsNullOrEmpty(apiUrl)) {
195208
throw new InvalidOperationException("Could not resolve MyGet API url.");
196209
}
197-
210+
198211
foreach(var package in (GetFiles("./artifacts/nuget/*.nupkg") - GetFiles("./artifacts/nuget/*.symbols.nupkg")))
199212
{
200213
DotNetCoreNuGetPush(package.FullPath,

build/make/Makefile

Lines changed: 0 additions & 82 deletions
This file was deleted.

build/version

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/LitJson/JsonWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private void PutNewline (bool add_comma)
223223
writer.Write (',');
224224

225225
if (pretty_print && ! context.ExpectingValue)
226-
writer.Write ('\n');
226+
writer.Write (Environment.NewLine);
227227
}
228228

229229
private void PutString (string str)

0 commit comments

Comments
 (0)