{"id":8134,"date":"2016-09-15T23:37:26","date_gmt":"2016-09-15T05:37:26","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=8134"},"modified":"2016-09-16T02:03:09","modified_gmt":"2016-09-15T17:03:09","slug":"%e3%82%a2%e3%83%aa%e3%82%b9%e3%81%af-system-json-%e3%81%ab%e5%87%ba%e4%bc%9a%e3%81%86","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/8134","title":{"rendered":"\u30a2\u30ea\u30b9\u306f System.Json \u306b\u51fa\u4f1a\u3046"},"content":{"rendered":"<blockquote class=\"twitter-tweet\" data-lang=\"ja\">\n<p dir=\"ltr\" lang=\"ja\">System.Json\u306a\u308b\u3082\u306e\u304c\u7206\u8a95\u3057\u3066\u305f\u3002<a href=\"https:\/\/t.co\/sZY8lumbX3\">https:\/\/t.co\/sZY8lumbX3<\/a><\/p>\n<p>\u2014 \u9ad8\u5f35\u5927\u96c5 (@taiga_takahari) <a href=\"https:\/\/twitter.com\/taiga_takahari\/status\/775865798019592192\">2016\u5e749\u670814\u65e5<\/a><\/p><\/blockquote>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3055\u3063\u305d\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u7121\u7406\u77e2\u7406 .NET Framework \u306e\u307b\u3046\u3067\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002\u3048\u3048\u3001.NET Core \u3058\u3083\u306a\u304f\u3066\u3001\u666e\u901a\u306e .NET Framework \u306b\u6301\u3063\u3066\u6765\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>corefx\/src\/System.Json at master \u30fb dotnet\/corefx<br \/>\n<a href=\"https:\/\/github.com\/dotnet\/corefx\/tree\/master\/src\/System.Json\">https:\/\/github.com\/dotnet\/corefx\/tree\/master\/src\/System.Json<\/a><\/p>\n<p>\u304b\u3089 System.Json \u306e src \u4ee5\u4e0b\u3092\u3054\u3063\u305d\u308a\u6301\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>Visual Studio 2015 \u3067\u30af\u30e9\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u6210<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/09\/dworkblogimage20160915_03org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/09\/dworkblogimage20160915_03thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u5b9f\u306f\u3001\u305d\u306e\u307e\u307e corefx \u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u6301\u3063\u3066\u6765\u3066\u5c11\u3057\u5909\u3048\u308b\u3060\u3051\u3067\u3044\u3051\u308b\u304b\u306a\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u7121\u7406\u3067\u3057\u305f\u3002<\/p>\n<p>\u30a8\u30e9\u30fc\u6642\u306b System.SR \u3068\u3044\u3046\u5185\u90e8\u7684\u306a\u30ea\u30bd\u30fc\u30b9\u306b\u30af\u30e9\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u30d3\u30eb\u30c9\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c0\u30df\u30fc\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\ninternal sealed class SR\r\n{\r\n    public static string ArgumentException_ArrayMustEndWithBracket { get; internal set; }\r\n    public static object ArgumentException_ExpectedXButGotY { get; internal set; }\r\n    public static object ArgumentException_ExpectedXDiferedAtY { get; internal set; }\r\n    public static string ArgumentException_ExtraCharacters { get; internal set; }\r\n    public static string ArgumentException_ExtraDot { get; internal set; }\r\n    public static string ArgumentException_IncompleteEscapeLiteral { get; internal set; }\r\n    public static string ArgumentException_IncompleteEscapeSequence { get; internal set; }\r\n    public static string ArgumentException_IncompleteExponent { get; internal set; }\r\n    public static string ArgumentException_IncompleteInput { get; internal set; }\r\n    public static string ArgumentException_InvalidLiteralFormat { get; internal set; }\r\n    public static string ArgumentException_LeadingZeros { get; internal set; }\r\n    public static object ArgumentException_MessageAt { get; internal set; }\r\n    public static string ArgumentException_NoDigitFound { get; internal set; }\r\n    public static string ArgumentException_StringNotClosed { get; internal set; }\r\n    public static object ArgumentException_UnexpectedCharacter { get; internal set; }\r\n    public static string ArgumentException_UnexpectedEscapeCharacter { get; internal set; }\r\n    public static object&#x5B;] NotSupported_UnexpectedParserType { get; internal set; }\r\n\r\n    internal static string Format( params object&#x5B;]  para)\r\n    {\r\n        throw new NotImplementedException();\r\n    }\r\n}\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d3\u30eb\u30c9\u306f\u901a\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u547c\u3073\u51fa\u3057\u5074\u306f\u3001<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nclass Program\r\n{\r\n    static void Main(string&#x5B;] args)\r\n    {\r\n        var json = @&quot;{ &quot;&quot;name&quot;&quot;: &quot;&quot;JSON&quot;&quot;, &quot;&quot;number&quot;&quot;: 13 }&quot;;\r\n        var jr = new JavaScriptReader(new StringReader(json), false);\r\n        var o = jr.Read();\r\n        var pairs = o as KeyValuePair&lt;string, object&gt;&#x5B;];\r\n\r\n        Console.WriteLine(&quot;hello &quot; + pairs&#x5B;0].Value);\r\n        Console.WriteLine(&quot;number is &quot; + pairs&#x5B;1].Value);\r\n    }\r\n}\r\n<\/pre>\n<p>\u306a\u611f\u3058\u3067\u3001JavaScriptReader \u30af\u30e9\u30b9\u3092 new \u3057\u3066\u3001Read \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002\u5143\u306e System.Json \u306e\u30c6\u30b9\u30c8\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f JsonValue \u306e\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3057\u304b\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u307e\u3042\u3001\u3053\u308c\u3067\u3044\u3051\u307e\u3059\u3002\u305f\u3060\u3057\u3001JavaScriptReader \u306f internal \u306a\u30af\u30e9\u30b9\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u300cpublic class JavaScriptReader\u300d\u306b\u66f8\u304d\u66ff\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>Read \u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u306f object \u578b\u306a\u306e\u3067\u3001\u9069\u5f53\u306a\u578b\u306b\u76f4\u3057\u307e\u3059\u3002\u3053\u308c\u3001\u6700\u7d42\u7684\u306b\u3069\u3046\u3059\u308b\u3064\u3082\u308a\u304b\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u3072\u3068\u307e\u305a\u3001KeyValuePair\u306e\u914d\u5217\u3067\u6765\u3066\u3044\u308b\u306e\u3067\u300cKeyValuePair&lt;string, object&gt;[]\u300d\u3067\u30ad\u30e3\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u30a2\u30ea\u30b9\u304c JSON \u306b\u51fa\u4f1a\u3048\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/09\/dworkblogimage20160915_04org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/09\/dworkblogimage20160915_04thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u3069\u3046\u3082\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u56f2\u307e\u306a\u3044\u3068\u99c4\u76ee\u306a\u306e\u3067\u3001RFC\u306b\u6cbf\u3044\u904e\u304e\u3066\u3044\u308b\u3068\u3044\u3046\u304b&#8230;\u300c{ name: &#8220;JSON&#8221; }\u300d\u306a JavaScript \u306e\u9023\u60f3\u914d\u5217\u306a JSON \u3082\u901a\u3057\u3066\u307b\u3057\u3044\u3067\u3059\u306d\u3002\u305d\u3046\u3044\u3046\u3068\u304d\u306f\u3001NuGet \u3067 Newtonsoft.Json \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u305b\u3088\u3001\u3068\u3044\u3046\u8a71\u306a\u3093\u3067\u3059\u304c :)\u00a0 \u30b3\u30fc\u30c9\u7684\u306b\u306fReadNumericLiteral \u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092\u30af\u30a9\u30fc\u30c8\u3067\u62fe\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u4fee\u6b63\u3059\u308c\u3070 ok.<\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>AliceJson-v0.1-src.zip<br \/>\n<a href=\"https:\/\/1drv.ms\/u\/s!AmXmBbuizQkXgfxWteUSWlBU7zrT1g\">https:\/\/1drv.ms\/u\/s!AmXmBbuizQkXgfxWteUSWlBU7zrT1g<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>System.Json\u306a\u308b\u3082\u306e\u304c\u7206\u8a95\u3057\u3066\u305f\u3002https:\/\/t.co\/sZY8lumbX3 \u2014 \u9ad8\u5f35\u5927\u96c5 (@taiga_takahari) 2016\u5e749\u670814\u65e5 \u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3055\u3063\u305d\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u7121\u7406\u77e2\u7406 .NE &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/8134\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3060,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-8134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-csharp"],"jetpack_featured_media_url":"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/12\/title-alice.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=8134"}],"version-history":[{"count":4,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8134\/revisions"}],"predecessor-version":[{"id":8138,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8134\/revisions\/8138"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media\/3060"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=8134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=8134"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=8134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}