### Home Classes Methods

### In Files

- ext/yajl_ext.c

### Parent

Object

### Methods

- #to_json

### Files

- README.rdoc
- Makefile

### Class/Module Index

Quicksearch

- Yajl
- Yajl::Bzip2
- Yajl::Bzip2::StreamReader
- Yajl::Bzip2::StreamWriter
- Yajl::Deflate
- Yajl::Deflate::StreamReader
- Yajl::Deflate::StreamWriter
- Yajl::EncodeError
- Yajl::Encoder
- Yajl::Gzip
- Yajl::Gzip::StreamReader
- Yajl::Gzip::StreamWriter
- Yajl::HttpStream
- Yajl::HttpStream::HttpError
- Yajl::HttpStream::InvalidContentType
- Yajl::ParseError
- Yajl::Parser
- Yajl::Stream
- JSON
- JSON::GeneratorError
- JSON::JSONError
- JSON::ParserError
- Array
- FalseClass
- Fixnum
- Float
- Hash
- Kernel
- NilClass
- Object
- String
- TrueClass

No matching classes.

# TrueClass

### 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_true_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.