{"id":8010,"date":"2016-08-25T11:13:57","date_gmt":"2016-08-25T02:13:57","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=8010"},"modified":"2016-08-25T11:20:20","modified_gmt":"2016-08-25T02:20:20","slug":"f%e3%81%a7asp-net-core%e3%81%aeweb-api%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86%ef%bc%88sqlite%e7%b7%a8%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/8010","title":{"rendered":"F#\u3067ASP.NET Core\u306eWeb API\u3092\u4f5c\u308d\u3046\uff08SQLite\u7de8\uff09"},"content":{"rendered":"<p>F#\u3067ASP.NET Core\u306eWeb API\u3092\u4f5c\u308d\u3046 | Moonmile Solutions Blog<br \/>\n<a href=\"http:\/\/www.moonmile.net\/blog\/archives\/7996\">http:\/\/www.moonmile.net\/blog\/archives\/7996<\/a><\/p>\n<p>\u306e\u7d9a\u304d\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306bSQLite\u3092\u4f7f\u3063\u3066Web API\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n.NET Core\u7528\u306eSQLite \u306f NuGet \u3067\u300c&#8221;Microsoft.EntityFrameworkCore.Sqlite&#8221;\u300d\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u4f7f\u3048\u3070ok\u3067\u3059\u3002<br \/>\nC#\u306e.NET Core\u306eWeb API\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u30b3\u30d4\u30fc\u3057\u305f\u3042\u3068\u304b\u3089\u3001\u518d\u30b9\u30bf\u30fc\u30c8\u3002<\/p>\n<h2>project.json\u306e\u4fee\u6b63<\/h2>\n<p>&#8211; &#8220;includeFiles&#8221; \u306bF#\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3072\u3068\u3064\u305a\u3064\u8ffd\u52a0\uff08\u9762\u5012\u3060\u3051\u3069\uff09<\/p>\n<p>&#8211; &#8220;dependencies&#8221; \u306b4\u3064\u306e\u53c2\u7167\u3092\u3092\u8ffd\u52a0<br \/>\n&#8211; &#8220;Microsoft.EntityFrameworkCore&#8221;<br \/>\n&#8211; &#8220;Microsoft.EntityFrameworkCore.Sqlite&#8221;<br \/>\n&#8211; &#8220;Microsoft.EntityFrameworkCore.Sqlite.Design&#8221;<br \/>\n&#8211; &#8220;Microsoft.EntityFrameworkCore.Tools&#8221;<\/p>\n<p>C#\u306e\u3068\u304d\u306f &#8220;Microsoft.EntityFrameworkCore&#8221; \u304c\u7121\u304f\u3066\u3082\u52d5\u304f\u306e\u3060\u3051\u3069\u3001F#\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f\u5165\u308c\u307e\u3059\u3002\u3067\u3082\u3001\u5165\u308c\u308b\u306e\u304c\u666e\u901a\u306a\u6c17\u304c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n{\r\n  &quot;version&quot;: &quot;1.0.0-*&quot;,\r\n  &quot;buildOptions&quot;: {\r\n    &quot;emitEntryPoint&quot;: true,\r\n    &quot;preserveCompilationContext&quot;: true,\r\n    &quot;debugType&quot;: &quot;portable&quot;,\r\n    &quot;compilerName&quot;: &quot;fsc&quot;,\r\n    &quot;compile&quot;: {\r\n      &quot;includeFiles&quot;: &#x5B;\r\n        &quot;Models\/Person.fs&quot;,\r\n        &quot;Data\/ApplicationDbContext.fs&quot;,\r\n        &quot;Controllers\/ValuesController.fs&quot;,\r\n        &quot;Controllers\/PeopleController.fs&quot;,\r\n        &quot;Startup.fs&quot;,\r\n        &quot;Program.fs&quot;\r\n      ]\r\n    }\r\n  },\r\n  &quot;tools&quot;: {\r\n    &quot;Microsoft.AspNetCore.Server.IISIntegration.Tools&quot;: &quot;1.0.0-preview2-final&quot;,\r\n    &quot;dotnet-compile-fsc&quot;:&quot;1.0.0-preview2-*&quot;\r\n  },\r\n\r\n  &quot;frameworks&quot;: {\r\n    &quot;netcoreapp1.0&quot;: {\r\n      &quot;imports&quot;: &#x5B;\r\n        &quot;dotnet5.6&quot;,\r\n        &quot;portable-net45+win8&quot;\r\n      ],\r\n      &quot;dependencies&quot;: {\r\n        &quot;Microsoft.NETCore.App&quot;: {\r\n          &quot;type&quot;: &quot;platform&quot;,\r\n          &quot;version&quot;: &quot;1.0.0&quot;\r\n        },\r\n        &quot;Microsoft.FSharp.Core.netcore&quot;: &quot;1.0.0-alpha-160629&quot;\r\n      }\r\n    }\r\n  },\r\n  &quot;dependencies&quot;: {\r\n    &quot;Microsoft.NETCore.App&quot;: {\r\n      &quot;version&quot;: &quot;1.0.0&quot;,\r\n      &quot;type&quot;: &quot;platform&quot;\r\n    },\r\n    &quot;Microsoft.AspNetCore.Mvc&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.AspNetCore.Server.IISIntegration&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.AspNetCore.Server.Kestrel&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Configuration.EnvironmentVariables&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Configuration.FileExtensions&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Configuration.Json&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Logging&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Logging.Console&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Logging.Debug&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.Extensions.Options.ConfigurationExtensions&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.EntityFrameworkCore&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.EntityFrameworkCore.Sqlite&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.EntityFrameworkCore.Sqlite.Design&quot;: &quot;1.0.0&quot;,\r\n    &quot;Microsoft.EntityFrameworkCore.Tools&quot;:  &quot;1.0.0-preview2-final&quot;\r\n  },\r\n\r\n  &quot;runtimeOptions&quot;: {\r\n    &quot;configProperties&quot;: {\r\n      &quot;System.GC.Server&quot;: true\r\n    }\r\n  },\r\n\r\n  &quot;publishOptions&quot;: {\r\n    &quot;include&quot;: &#x5B;\r\n      &quot;wwwroot&quot;,\r\n      &quot;Views&quot;,\r\n      &quot;Areas\/**\/Views&quot;,\r\n      &quot;appsettings.json&quot;,\r\n      &quot;web.config&quot;\r\n    ]\r\n  },\r\n\r\n  &quot;scripts&quot;: {\r\n    &quot;postpublish&quot;: &#x5B; &quot;dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%&quot; ]\r\n  }\r\n}\r\n<\/pre>\n<h2>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u306e\u8a2d\u5b9a<\/h2>\n<p>appsettings.json \u306b &#8220;DefaultConnection&#8221; \u3092\u8ffd\u52a0\u3002\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u306bSQLite\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u7f6e\u304d\u307e\u3059\u3002<\/p>\n<p>appsettings.json<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n{\r\n  &quot;ConnectionStrings&quot;: {\r\n    &quot;DefaultConnection&quot;: &quot;Filename=.\/sample.db&quot;\r\n  },\r\n  &quot;Logging&quot;: {\r\n    &quot;IncludeScopes&quot;: false,\r\n    &quot;LogLevel&quot;: {\r\n      &quot;Default&quot;: &quot;Debug&quot;,\r\n      &quot;System&quot;: &quot;Information&quot;,\r\n      &quot;Microsoft&quot;: &quot;Information&quot;\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>Startup\u30af\u30e9\u30b9\u306eConfigureServices\u30e1\u30bd\u30c3\u30c9\u3067SQLite\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\ntype Startup(env:IHostingEnvironment) as this =\r\n    do \r\n        let builder = new ConfigurationBuilder()\r\n        builder.SetBasePath(env.ContentRootPath)\r\n                .AddJsonFile(&amp;quot;appsettings.json&amp;quot;, true, true)\r\n                .AddJsonFile(&amp;quot;appsettings.&amp;quot; + env.EnvironmentName + &amp;quot;.json&amp;quot;, true)\r\n                .AddEnvironmentVariables() |&gt; ignore\r\n        this.Configuration &lt;- builder.Build()\r\n\r\n    &#x5B;&lt;DefaultValue&gt;]\r\n    val mutable _Configuration:IConfigurationRoot \r\n    member val Configuration:IConfigurationRoot = null with get, set\r\n    member x.ConfigureServices( services:IServiceCollection ) =\r\n        services.AddDbContext&lt;ApplicationDbContext&gt;( \r\n            fun options -&gt;\r\n                options.UseSqlite(this._Configuration.GetConnectionString(&amp;quot;DefaultConnection&amp;quot;)) |&gt; ignore\r\n                ) |&gt; ignore\r\n        services.AddMvc() |&gt; ignore\r\n        ()\r\n\r\n    member x.Configure( app:IApplicationBuilder, env:IHostingEnvironment, loggerFactory:ILoggerFactory ) =\r\n        loggerFactory.AddConsole(this._Configuration.GetSection(&amp;quot;Logging&amp;quot;)) |&gt; ignore\r\n        loggerFactory.AddDebug() |&gt; ignore\r\n        app.UseMvc() |&gt; ignore\r\n        ()\r\n<\/pre>\n<h2>Model\u306e\u4f5c\u6210<\/h2>\n<p>\u30b7\u30f3\u30d7\u30eb\u306b\u81ea\u52d5\u751f\u6210\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>Person.cs<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\ntype Person() =\r\n    member val Id = 0 with get, set\r\n    member val Name = &quot;&quot; with get, set\r\n    member val Age = 0 with get, set\r\n<\/pre>\n<p>ApplicationDbContext\u306e\u4f5c\u6210<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nnamespace ApiFSharp.Data\r\nopen Microsoft.EntityFrameworkCore\r\nopen ApiFSharp.Models\r\n\r\ntype ApplicationDbContext( options:DbContextOptions&lt;ApplicationDbContext&gt; ) =\r\n    inherit DbContext( options )\r\n    &#x5B;&lt;DefaultValue&gt;] \r\n    val mutable _Person:DbSet&lt;Person&gt; \r\n    member x.Person with get() = x._Person and set value = x._Person &lt;- value\r\n    override x.OnModelCreating( builder:ModelBuilder ) =\r\n        base.OnModelCreating(builder)\r\n        ()\r\n<\/pre>\n<p>\u5b9f\u306f\u3001\u300cmember x.Person with &#8230;\u300d\u306e\u3068\u3053\u308d\u3067\u968f\u5206\u60a9\u307f\u307e\u3057\u305f\u3002<br \/>\n\u81ea\u5df1\u53c2\u7167\u306e\u3064\u3082\u308a\u3067\u3001this \u3092\u8ffd\u52a0\u3057\u3066 this._Person \u3067\u53c2\u7167\u3055\u305b\u308b\u3068\u5b9f\u884c\u6642\u306b\u3001\u5faa\u74b0\u53c2\u7167\u306e\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\ntype ApplicationDbContext( options:DbContextOptions&lt;ApplicationDbContext&gt; ) as this=\r\n    inherit DbContext( options )\r\n    &#x5B;&lt;DefaultValue&gt;] \r\n    val mutable _Person:DbSet&lt;Person&gt; \r\n    member x.Person with get() = this._Person and set value = this._Person &lt;- value\r\n<\/pre>\n<p>http:\/\/localhost:5000\/api\/people \u3067\u3001Web API\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001System.InvalidOperationException \u306e\u4f8b\u5916\u304c\u767a\u751f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nHosting environment: Production\r\nContent root path: D:workblogsrcSQLiteWebApiSQLiteWebApiSQLiteFSharp\r\nNow listening on: http:\/\/*:5000\r\nApplication started. Press Ctrl+C to shut down.\r\ninfo: Microsoft.AspNetCore.Hosting.Internal.WebHost&#x5B;1]\r\n      Request starting HTTP\/1.1 GET http:\/\/localhost:5000\/api\/people\r\nfail: Microsoft.AspNetCore.Server.Kestrel&#x5B;13]\r\n      Connection id &quot;0HKUCHBOFLSDB&quot;: An unhandled exception was thrown by the application.\r\nSystem.InvalidOperationException: The initialization of an object or value resulted in an object or value being accessed\r\n recursively before it was fully initialized.\r\n   at Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.FailInit()\r\n   at ApiFSharp.Data.ApplicationDbContext.set_Person(DbSet`1 value)\r\n   at Microsoft.EntityFrameworkCore.Internal.DbSetInitializer.InitializeSets(DbContext context)\r\n   at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)\r\n   at ApiFSharp.Data.ApplicationDbContext..ctor(DbContextOptions`1 options)\r\n...\r\n<\/pre>\n<p>\u3053\u308c\u3092 this \u4f7f\u308f\u305a\u306b<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\ntype ApplicationDbContext( options:DbContextOptions&lt;ApplicationDbContext&gt; ) =\r\n    inherit DbContext( options )\r\n    &#x5B;&lt;DefaultValue&gt;] \r\n    val mutable _Person:DbSet&lt;Person&gt; \r\n    member x.Person with get() = x._Person and set value = x._Person &lt;- value\r\n<\/pre>\n<p>\u3068\u3059\u308b\u3068\u5faa\u74b0\u3057\u306a\u3044\u306e\u3067\u3001\u306a\u3093\u304b\u7406\u7531\u304c\u3042\u308b\u3093\u3067\u3059\u304b\u306d\uff1f\u8b0e\u3067\u3059\u3002<\/p>\n<h2>Controller\u306e\u4f5c\u6210<\/h2>\n<p>\u307e\u3081\u306b ignore \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n&#x5B;&lt;Route(&amp;quot;api\/&#x5B;controller]&amp;quot;)&gt;]\r\ntype PeopleController(context) =\r\n    inherit Controller() \r\n    let _context:ApplicationDbContext = context\r\n\r\n    &#x5B;&lt;HttpGet&gt;]\r\n    member x.Get () = \r\n        if isNull _context.Person then  \r\n            new List&lt;Person&gt;()\r\n        else\r\n             _context.Person.ToList()\r\n    &#x5B;&lt;HttpGet(&amp;quot;{id}&amp;quot;)&gt;]\r\n    member x.Get (id:int) = \r\n        _context.Person.SingleOrDefault( fun m -&gt; m.Id = id )\r\n    &#x5B;&lt;HttpPost&gt;]\r\n    member x.Post(&#x5B;&lt;FromBody&gt;] person:Person) =\r\n        _context.Add( person ) |&gt; ignore\r\n        _context.SaveChanges() |&gt; ignore\r\n        person.Id\r\n    &#x5B;&lt;HttpPut(&amp;quot;{id}&amp;quot;)&gt;]\r\n    member x.Put( id:int, &#x5B;&lt;FromBody&gt;] person:Person) =\r\n        if id &lt;&gt; person.Id then\r\n            -1\r\n        else \r\n            _context.Update( person ) |&gt; ignore\r\n            _context.SaveChanges() |&gt; ignore\r\n            person.Id\r\n    &#x5B;&lt;HttpDelete(&amp;quot;{id}&amp;quot;)&gt;]\r\n    member x.Delete( id:int ) =\r\n        let person = _context.Person.SingleOrDefault( fun m -&gt; m.Id = id )\r\n        _context.Person.Remove( person ) |&gt; ignore\r\n        _context.SaveChanges() |&gt; ignore\r\n        person.Id\r\n<\/pre>\n<h2>\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c<\/h2>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u300csample.db\u300d\u306f\u81ea\u52d5\u3067\u306f\u4f5c\u3063\u3066\u304f\u308c\u306a\u3044\u306e\u3067\u3001\u4f55\u3089\u304b\u306e\u5f62\u3067\u3042\u3089\u304b\u3058\u3081\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/08\/dworkblogimage20160825_01org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2016\/08\/dworkblogimage20160825_01thum.jpg\" border=\"0\" \/><\/a><\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u3053\u3061\u3089\u3002C#\u7248\u3082\u542b\u3081\u3066\u3042\u308a\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/1drv.ms\/u\/s!AmXmBbuizQkXgfwM4A7bz3cWyThD_Q\">https:\/\/1drv.ms\/u\/s!AmXmBbuizQkXgfwM4A7bz3cWyThD_Q<\/a><\/p>\n<h2>\u6b21\u306f&#8230;<\/h2>\n<p>\u3042\u308c\u3053\u308c\u8ffd\u52a0\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001ASP.NET Core\u306a\u74b0\u5883\u3067\u3001F#\u3067Web API\u304c\u4f5c\u308c\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002\u672c\u5f53\u306fASP.NET MVC\u306b\u3057\u305f\u3044\u3051\u3069\u3001View\u30da\u30fc\u30b8\u306eRazor\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u7121\u7406\u304b\u306a\u3002\u3053\u306e\u3042\u305f\u308a\u306f\u5f8c\u3067\u8abf\u3079\u307e\u3059\u3002<br \/>\n\u958b\u767a\u74b0\u5883\u306f Visual Studio Code\u3092\u4f7f\u3046\uff08\u3068\u3044\u3046\u304b\u3001\u3080\u3057\u308d Visual Studio 2015\u4e0a\u3067\u306f\u958b\u767a\u3067\u304d\u306a\u3044\uff09\u306e\u3067\u3001Linux\u306fMac\u4e0a\u3067\u3082\u958b\u767a\uff06\u52d5\u4f5c\u304c\u3067\u304d\u307e\u3059\u3002IIS\u3068\u304bApache\u3068\u304b\u306b\u95a2\u4fc2\u306a\u304f\u3001\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d0\u30fc\u7684\u306bWeb API\u3092\u63d0\u4f9b\u3067\u304d\u308b\u74b0\u5883\u304c\u3067\u304d\u308b\u306e\u306f\u3088\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002Azure\u306b\u4e57\u305b\u305f\u308a\u3059\u308b\u3068\u3001\u81ea\u524d\u306e\u306a\u3093\u304b\u306e\u30d7\u30ed\u30ad\u30b7\u3068\u304b\u4f5c\u308c\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3059\u304b\u306d\u3002\u3044\u3084\u3001C#\u3067\u66f8\u3044\u305f\u307b\u3046\u304c\u697d\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u306a\u3093\u304b\u6574\u7406\u3057\u3066\u3001Controller\u3060\u3051\u3055\u304f\u3055\u304f\u3068\u5b9f\u9a13\uff06\u62e1\u5f35\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u3001\u624b\u8efd\u306aWeb API\u304c\u4f5c\u308c\u308b\u304b\u3082\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>F#\u3067ASP.NET Core\u306eWeb API\u3092\u4f5c\u308d\u3046 | Moonmile Solutions Blog http:\/\/www.moonmile.net\/blog\/archives\/7996 \u306e\u7d9a\u304d\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306bS &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/8010\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[19,59,88],"tags":[],"class_list":["post-8010","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-f","category-sqlite"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8010","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=8010"}],"version-history":[{"count":4,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8010\/revisions"}],"predecessor-version":[{"id":8014,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8010\/revisions\/8014"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=8010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=8010"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=8010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}