タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

JSONとdebugに関するefclのブックマーク (2)

  • Problem Details for HTTP APIs

    Network Working Group M. Nottingham Internet-Draft Akamai Intended status: Standards Track E. Wilde Expires: June 8, 2016 December 6, 2015 Problem Details for HTTP APIs Abstract This document defines a "problem detail" as a way to carry machine- readable details of errors in a HTTP response, to avoid the need to define new error response formats for HTTP APIs. Note to Readers This draft should be

    Problem Details for HTTP APIs
    efcl
    efcl 2016/01/01
    JSONのエラーレスポンスのフォーマット
  • デバッグ中にJSONをサッと出力する

    NSDictionaryやNSArrayのdescriptionはそれとなく見やすいフォーマットで出力されますが、JSONで欲しくなる場合があります。 しかも、デバッグ中に欲しくなったりします。 XcodeのLLDBは~/.lldbinit-Xcodeに独自のコマンドを定義することができるので、 pretty printedなJSONを吐くコマンドを定義してカジュアルにJSONを得られるようにしてみました。 1 command regex pj 's/^(.+)$/po [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:%1 options:1 error:nil] encoding:4]/' ここで定義したpjコマンドを使うと以下のようなNSDictionaryから 1 2 3 NSDiction

    efcl
    efcl 2014/01/09
    lldbでオブジェクトをJSONで取得するコマンドを加える
  • 1