Skip to content

Commit

Permalink
Merge branch 'release/0.11.0'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
devlead committed Jan 8, 2018
2 parents 0f970e2 + 468866b commit 52d96c7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 292 deletions.
200 changes: 1 addition & 199 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,199 +1 @@
LitJSON 0.9.0
=============

2014-09-08

## Additions

* Added `JsonData.Keys` property, with type `ICollection<string>`.

## Bug fixes

* Handle nullable types (Issue #3)
* Parse UInt64 numbers correctly

## Other changes

* Allow specifying a custom PKG_CONFIG in build/make.

## Contributors for this release

- Michael Bartnett (@michaelbartnett)
- @MickeyKim


- - -


LitJSON 0.7.0
=============

2013-04-26

General changes and improvements:

* Simplified the building mechanism. Dropped the entire autotools
infrastructure, and instead added a single Makefile to compile the project
and run the tests with *GNU make*.

* Added `SkipNonMembers` property to `JsonReader`. When active, it allows to
parse JSON data using `JsonMapper.ToObject<T>` and ignore any properties
not available in the type `T`. Its default value is `true`.

* Started moving the documentation into Markdown format.

* Added a new section to the QuickStart Guide, regarding customisation of
the library's behaviour.

Bug fixes:

* Convert `null` properties properly in `JsonData.ToJson`.

* Read nested arrays in `JsonMapper.ToObject` and `JsonMapper.ToObject<T>`
correctly.

Contributors for this release:

- whoo24
- Christopher Dummy


LitJSON 0.5.0
=============

2007-10-04

New features and improvements:

* The JsonRader class now has two properties to control the reading of data
from an input stream: EndOfInput and EndOfJson. The latter becomes
true whenever a complete piece of JSON text has been read, while the
former is a flag that becomes true when the stream itself reaches the end.
This way, reading multiple JSON texts from the same input stream is
straightforward.

* Added new base importers in JsonMapper for reading numeric values
correctly into float and double members.

* Now Enum's can be imported/exported as numeric values.

* JsonData implements the IEquatable<T> interface now.


API changes:

The following types are new:
enum JsonType

The following methods are new:
IJsonWrapper.GetJsonType()
IJsonWrapper.SetJsonType()

The following properties are new:
JsonReader.EndOfInput


Bug fixes:

* Correctly import/export properties that are read-only or write-only.

* Correctly convert null values when adding them as array elements or
properties to a JsonData instance.

* Fixed conversion of empty JSON objects and arrays.


Thanks to all the contributors that reported problems and suggested fixes
for this release:
Colin Alworth
Ralf Callenberg
andi


LitJSON 0.3.0
=============

2007-08-15

New features and improvements:

* Exporters and importers.
Custom conversions using the JsonMapper class can be made through
importers and exporters. These are delegates that tell the library how to
perform conversions between non-basic types (i.e. not string, int, long,
double or boolean) and JSON. There are base and custom
exporters/importers. The base exporters and importers are built-in
delegates that currently handle simple conversions between JSON and the
following value types:

byte
char
DateTime
decimal
sbyte
short
ushort
uint
ulong

Custom exporters and importers can be defined through
JsonMapper.RegisterExporter and JsonMapper.RegisterImporter, and they
override the built-in conversions.

* Improved performance of JsonMapper.ToJson()
A static JsonWriter is re-used to reduce the activity in the heap,
improving performance for multiple conversions.

* Allowing extended grammar
The lexer can now accept single-quoted strings, and comments in the
following forms:

// Single-line comment

/*
* Multi-line comment
*/

This way, certain forms of input coming from JavaScript that don't
necessarily conform to the strict JSON grammar are allowed and succesfully
parsed.

A JsonReader can be configured to accept only the strict grammar or the
extended one. These extensions are allowed by default.

* API cleanups and additions.
The following members are new:

JsonData.Count
JsonMapper.RegisterExporter()
JsonMapper.RegisterImporter()
JsonMapper.UnregisterExporters()
JsonMapper.UnregisterImporters()
JsonReader.AllowComments
JsonReader.AllowSingleQuotedStrings
JsonWriter.Reset()

The following overloads have been added:

JsonMapper.ToJson(object obj, JsonWriter writer)
JsonMapper.ToObject(JsonReader reader)

The following members have been renamed:

JsonReader.HasReachedEnd is now JsonReader.EndOfJson


Bugs fixed:

* JsonMapper.ToJson() avoids entering an infinite recursion by defining a
max nesting depth.
* The JsonData int indexer now behaves correctly both when it acts as an
array and as an object.


LitJSON 0.1.0
=============

2007-08-09

First release.
News has moved to https://litjson.net/blog/
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ build_script:
- ps: .\build.ps1 --target="AppVeyor" --verbosity=Verbose

# Tests
test: off
test: off

init:
- git config --global core.autocrlf true
27 changes: 20 additions & 7 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Task("Clean")
"./test/bin",
"./src/obj",
"./test/obj",
"./artifacts/nuget"
"./artifacts/nuget"
}
);
});
Expand All @@ -102,7 +102,8 @@ Task("Build")
DotNetCoreBuild("./LitJSON.sln",
new DotNetCoreBuildSettings {
Configuration = configuration,
MSBuildSettings = msBuildSettings
MSBuildSettings = msBuildSettings,
ArgumentCustomization = args => args.Append("--no-restore")
}
);
});
Expand All @@ -114,7 +115,8 @@ Task("Test")
new DotNetCoreTestSettings {
Configuration = configuration,
Framework = "netcoreapp2.0",
NoBuild = true
NoBuild = true,
ArgumentCustomization = args => args.Append("--no-restore")
}
);
Expand All @@ -123,16 +125,28 @@ Task("Test")
});
});

Task("Test-SourceLink")
.IsDependentOn("Build")
.WithCriteria(IsRunningOnWindows())
.Does(() => {
foreach(var asssembly in GetFiles("./src/LitJSON/bin/" + configuration + "/**/*.dll"))
{
DotNetCoreTool("./src/LitJSON/LitJSON.csproj", "sourcelink", $"test {asssembly}");
}
});

Task("Package")
.IsDependentOn("Test")
.IsDependentOn("Test-SourceLink")
.Does(() => {
DotNetCorePack("./src/LitJSON/LitJSON.csproj",
new DotNetCorePackSettings {
Configuration = configuration,
NoBuild = true,
IncludeSymbols = true,
OutputDirectory = "./artifacts/nuget",
MSBuildSettings = msBuildSettings
MSBuildSettings = msBuildSettings,
ArgumentCustomization = args => args.Append("--no-restore")
}
);
});
Expand All @@ -141,7 +155,6 @@ Task("Upload-AppVeyor-Artifacts")
.IsDependentOn("Package")
.WithCriteria(AppVeyor.IsRunningOnAppVeyor)
.Does(() => {
foreach(var artifact in GetFiles("./artifacts/**/*.*"))
{
AppVeyor.UploadArtifact(artifact);
Expand All @@ -165,7 +178,7 @@ Task("Publish-MyGet")
if(string.IsNullOrEmpty(apiUrl)) {
throw new InvalidOperationException("Could not resolve MyGet API url.");
}
foreach(var package in (GetFiles("./artifacts/nuget/*.nupkg") - GetFiles("./artifacts/nuget/*.symbols.nupkg")))
{
DotNetCoreNuGetPush(package.FullPath,
Expand Down Expand Up @@ -194,7 +207,7 @@ Task("Publish-NuGet")
if(string.IsNullOrEmpty(apiUrl)) {
throw new InvalidOperationException("Could not resolve MyGet API url.");
}
foreach(var package in (GetFiles("./artifacts/nuget/*.nupkg") - GetFiles("./artifacts/nuget/*.symbols.nupkg")))
{
DotNetCoreNuGetPush(package.FullPath,
Expand Down
82 changes: 0 additions & 82 deletions build/make/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion build/version

This file was deleted.

2 changes: 1 addition & 1 deletion src/LitJson/JsonWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private void PutNewline (bool add_comma)
writer.Write (',');

if (pretty_print && ! context.ExpectingValue)
writer.Write ('\n');
writer.Write (Environment.NewLine);
}

private void PutString (string str)
Expand Down
Loading

0 comments on commit 52d96c7

Please sign in to comment.