Skip to content

Commit fa1b90b

Browse files
committed
Add better decoding output of market.json
1 parent 4f47245 commit fa1b90b

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

capidemo/CAPIDemo.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
3636
<ItemGroup>
37+
<Reference Include="QuickJSON, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
38+
<HintPath>..\packages\RJKJSoft.QuickJSON.0.9.0\lib\net48\QuickJSON.dll</HintPath>
39+
</Reference>
3740
<Reference Include="System" />
3841
<Reference Include="System.Core" />
3942
<Reference Include="System.Xml.Linq" />
@@ -69,6 +72,7 @@
6972
<DependentUpon>Resources.resx</DependentUpon>
7073
<DesignTime>True</DesignTime>
7174
</Compile>
75+
<None Include="packages.config" />
7276
<None Include="Properties\Settings.settings">
7377
<Generator>SettingsSingleFileGenerator</Generator>
7478
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

capidemo/CapiDemoForm.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Threading.Tasks;
1111
using System.Windows.Forms;
1212
using CAPI;
13+
using QuickJSON;
1314

1415
// NOTE you need an enviromental variable called CAPIID set up with your Frontier CAPI ID BEFORE RUNNING visual studio.
1516
// use the control panel system | Enviromental variables to initialise this
@@ -193,7 +194,11 @@ private void buttonMarket_Click(object sender, EventArgs e)
193194
{
194195
string p = capi.Market();
195196
File.WriteAllText(rootpath+"market.json", p);
196-
System.Diagnostics.Debug.WriteLine("Market JSON" + p);
197+
{
198+
JToken t = JToken.Parse(p);
199+
System.Diagnostics.Debug.WriteLine("Market JSON" + t.ToString(true));
200+
201+
}
197202

198203
richTextBox.AppendText( "-------------------------" + Environment.NewLine);
199204

capidemo/packages.config

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="RJKJSoft.QuickJSON" version="0.9.0" targetFramework="net48" />
4+
</packages>

0 commit comments

Comments
 (0)