xml, json, perl, maven | 02:16 | 僕はXML ファイルについて、 「読みにくい」「書きにくい (書くのがめんどい)」「ファイルが無駄に長くなる」 の3拍子がバッチリ揃っている、「人類がマトモに扱うにはちょっと早すぎるフォーマット」だと思っていて、 「コイ... 続きを読む
先日、ブログパーツ作成フレームワーク 爆速JSONP をGitHubにて公開しました。2012年8月にYahoo! JAPANのソフトウエアガイドラインをライセンスとするバージョンを公開しましたが、オープンソース化に伴い、CDNで配布しているファイルもGitHub版に差し替えてい... 続きを読む
jq is a lightweight and flexible command-line JSON processor. jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. j... 続きを読む
Jbuilder Jbuilder gives you a simple DSL for declaring JSON structures that beats massaging giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops. Here's a simple example: Jbuil... 続きを読む
Easily handle JSON in RSpec and Cucumber Installation gem install json_spec or with Bundler: gem "json_spec" Documentation Please help write documentation! http://rdoc.info/gems/json_spec Continuous Integration RSpec json_spec defines four ne... 続きを読む
Railsどっぷりのkadoppeです。こんばんは。 タイトルの通り、to_jsonメソッドを呼び出すことにより得られるJSONフォーマットの文字列に、モデルクラスに定義されたインスタンスメソッドの戻り値を含める方法を紹介したいと思います。どこかの誰かの参考になれば... 続きを読む
rspecで簡単にJSONの構造をテストしたい時に使えるTIPS # spec/support/custom_matchers.rb RSpec::Matchers.define :have_json do |selector| match do |response_body| selector.gsub!(/_/,'-') json = JSON.parse(response_body) prefix = case json when Ar... 続きを読む
May 8th 2008 – Controller::$beforeFilter has been deprecated a while ago, i’ve updated the example using Controller::beforeFilter() Almost an half year ago I created jsonComponent for CakePHP, since then it has been used by quite a few peop... 続きを読む
JSON Framework を使って JSON をパースする方法です。まだ、JSON Framework をインストールしていない場合は、前回の JSON Framework の使い方(準備編)からやってみてください。 NSString *jsonData = [[NSString alloc] initWithContentsOfURL:[NSURL URLWi... 続きを読む
Objective-C で JSON を解析するフレームワークがあります。この JSON Framework は iPhone でも使えるので早速インストールしてみました。プロジェクト毎に設定する必要があるので忘れないようにメモしておきます。 Google Code から dmg ファイルをダウンロー... 続きを読む
This framework implements a strict JSON parser and generator in Objective-C. Download the framework, embed it in your application, and import the JSON/JSON.h header. You're now ready to make your application speak JSON. The framework adds cat... 続きを読む
■ [JSON] 識別子、文字列または数がありません。 21:40 IEだと出るエラー。Firefoxだとエラーにはならない。 識別子、文字列または数がありません。 これは、ブラウザごとのオブジェクト記法の解釈の違い?によるもの?みたい?*1 var obj = { "foo": [ 1, 2, ... 続きを読む
C#でオブジェクトをJSON形式でシリアライズするにはまずシリアライズするクラスにDataContract属性とそのプロパティにDataMember属性を設定しておく。 [System.Runtime.Serialization.DataContract()] public class Class1 { [System.Runtime.Serialization.Dat... 続きを読む