+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jsonparser", "jsonparser\jsonparser.csproj", "{D2D89F92-D070-4D60-A728-1BDF897438DD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D2D89F92-D070-4D60-A728-1BDF897438DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D2D89F92-D070-4D60-A728-1BDF897438DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D2D89F92-D070-4D60-A728-1BDF897438DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D2D89F92-D070-4D60-A728-1BDF897438DD}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = jsonparser\jsonparser.csproj
- EndGlobalSection
-EndGlobal
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using jsonparser.currentweather;
-
-namespace jsonparser
-{
- class MainClass
- {
- /// <summary>
- /// The _json settings.
- /// </summary>
- private static readonly JsonSerializerSettings _jsonSettings =
- new JsonSerializerSettings
- {
- Error = delegate(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args)
- {
- Console.WriteLine(args.ErrorContext.Error.Message);
- args.ErrorContext.Handled = true;
- }
- };
-
- public static void Main(string[] args)
- {
- Console.WriteLine("LOL");
- string jsonCurrentWeatherData = @"{""coord"":{""lon"":-2.15,""lat"":57},""sys"":{""message"":0.0076,""country"":""GB"",""sunrise"":1398227897,""sunset"":1398281723},""weather"":[{""id"":741,""main"":""Fog"",""description"":""fog"",""icon"":""50n""}],""base"":""cmc stations"",""main"":{""temp"":281.15,""pressure"":1013,""humidity"":100,""temp_min"":281.15,""temp_max"":281.15},""wind"":{""speed"":3.6,""deg"":130},""rain"":{""3h"":0.5},""clouds"":{""all"":90},""dt"":1398223200,""id"":2636814,""name"":""Stonehaven"",""cod"":200}";
-
-
- CurrentWeather currentWeather = ReadResponse(jsonCurrentWeatherData);
-
- }
-
-
- private static CurrentWeather ReadResponse(string json)
- {
- return JsonConvert.DeserializeObject<CurrentWeather>(json, _jsonSettings);
- }
-
- }
-}
+++ /dev/null
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-[assembly: AssemblyTitle("jsonparser")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("gumartinm.name")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("gumartinm.name")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("1.0.*")]
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Clouds
- {
- public int all { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Coord
- {
- public double lon { get; set; }
- public int lat { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-using System.Collections.Generic;
-
-namespace jsonparser.currentweather
-{
- public class CurrentWeather
- {
- public Coord coord { get; set; }
- public Sys sys { get; set; }
- public List<Weather> weather { get; set; }
- public string @base { get; set; }
- public Main main { get; set; }
- public Wind wind { get; set; }
- public Rain rain { get; set; }
- public Clouds clouds { get; set; }
- public int dt { get; set; }
- public int id { get; set; }
- public string name { get; set; }
- public int cod { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Main
- {
- public double temp { get; set; }
- public int pressure { get; set; }
- public int humidity { get; set; }
- public double temp_min { get; set; }
- public double temp_max { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Rain
- {
- private double threeHours;
-
- public void set3h(double three)
- {
- this.threeHours = three;
- }
-
- public double get3h()
- {
- return this.threeHours;
- }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Sys
- {
- public double message { get; set; }
- public string country { get; set; }
- public int sunrise { get; set; }
- public int sunset { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Weather
- {
- public int id { get; set; }
- public string main { get; set; }
- public string description { get; set; }
- public string icon { get; set; }
- }
-}
-
+++ /dev/null
-using System;
-
-namespace jsonparser.currentweather
-{
- public class Wind
- {
- public double speed { get; set; }
- public int deg { get; set; }
- }
-}
-
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>12.0.0</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D2D89F92-D070-4D60-A728-1BDF897438DD}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>jsonparser</RootNamespace>
- <AssemblyName>jsonparser</AssemblyName>
- <CodePage>65001</CodePage>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <WarningLevel>4</WarningLevel>
- <Externalconsole>true</Externalconsole>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=c7439020c8fedf87">
- <Package>monodevelop</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="currentweather\Coord.cs" />
- <Compile Include="currentweather\Sys.cs" />
- <Compile Include="currentweather\Weather.cs" />
- <Compile Include="currentweather\Main.cs" />
- <Compile Include="currentweather\Wind.cs" />
- <Compile Include="currentweather\Rain.cs" />
- <Compile Include="currentweather\Clouds.cs" />
- <Compile Include="currentweather\CurrentWeather.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Folder Include="currentweather\" />
- </ItemGroup>
-</Project>
\ No newline at end of file