Skip to content

Commit

Permalink
JSON package and json array correct string format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr authored and Petr committed Oct 1, 2017
1 parent 8527b8c commit 5d5635c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
################################################################################

/4.0.0.4/packages/Newtonsoft.Json.10.0.3
/4.0.0.4/.vs/WLive/v14/.suo
4 changes: 3 additions & 1 deletion 4.0.0.4/AGetConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,13 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
{
writer.WritePropertyName(wa.Name);
writer.WriteStartArray();
List<string> arrayData = new List<string>();
foreach (var loop in (dynamic)mi.GetValue(value, null))
{
string data = JsonConvert.SerializeObject(loop, Settings);
writer.WriteRaw(data);
arrayData.Add(data);
}
writer.WriteRaw(string.Join(", ", arrayData));
writer.WriteEndArray();
}
else if (jo[mi.Name].Type == JTokenType.Object)
Expand Down
6 changes: 4 additions & 2 deletions 4.0.0.4/WLive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
<AssemblyOriginatorKeyFile>WLiveFW.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\Nová složka\dll\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down Expand Up @@ -94,6 +95,7 @@
<Compile Include="WLiveObjects\Work.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="WLive.ruleset" />
<None Include="WLiveFW.pfx" />
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions 4.0.0.4/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net40" />
</packages>

0 comments on commit 5d5635c

Please sign in to comment.