In Files

Parent

Methods

Fixnum

Public Instance Methods

to_json(encoder=Yajl::Encoder.new) click to toggle source

encoder is an existing Yajl::Encoder used to encode JSON

Encodes an instance of Hash to JSON

static VALUE rb_yajl_json_ext_fixnum_to_json(int argc, VALUE * argv, VALUE self) {
    VALUE rb_encoder;
    rb_scan_args(argc, argv, "01", &rb_encoder);
    if (rb_encoder == Qnil) {
        rb_encoder = rb_yajl_encoder_new(0, NULL, cEncoder);
    }
    return rb_yajl_encoder_encode(1, &self, rb_encoder);
}

[Validate]

Generated with the Darkfish Rdoc Generator 2.