1年以上ぶりにNancyFxネタ。日本語の情報があまりないので、色々書いて行こうと思います。 ユーザが増えてくれれば嬉しいですね。 さてNancyFxでは、デフォルトでJsonレスポンスを返すことが出来ます。 Get["/json"] = _ => { var data = new { Id = 1, Name = "rabitarochan", BlogUrl = "http://rabitarochan.hatenablog.com/" }; return Response.AsJson(data); }; ブラウザからこのURLにアクセスすると、以下のようなJsonが返ります。 { Id: 1, Name: "rabitarochan", BlogUrl: "http://rabitarochan.hatenablog.com/" } よくよく見てみると、キーがC#のプロパティ名と同