For Active record its working fine
ActiveRecord::Base.include_root_in_json = false
User.first.as_json
=> { "id" => 1, "name" => "Konata Izumi", "age" => 16,
"created_at" => "2006/08/01", "awesome" => true}
When I use it for Neo4j.rb active node
Person.first.as_json
=> {"person"=> {" first_name"=>"Kay", "last_name" => "Wood",
"email" => "[email protected]" } }
This how I am going to send repsosne by API, I don't need this root element Any help??
From the neo4j documentation :
So you could just add
in
config/application.rb
.