0

I want to use YAJL to render JSON. If I require 'yajl' in the controller and perform a render :json => some_hash, will this use YAJL to encode the hash into json? Should I convert the hash to JSON using YAJL's encode method before calling render?

If not, how can I go about doing this?

Jey Balachandran
  • 3,585
  • 5
  • 27
  • 36

1 Answers1

-1

Use require 'yajl/json_gem' on the end of environment.rb

To see if this works just inject some logging into Yajl::Encoder.encode - just for check.

gertas
  • 16,869
  • 1
  • 76
  • 58