From 9c70b519bafaf7ee0d93e01c8f35d5399200ecfc Mon Sep 17 00:00:00 2001 From: Mike Fotinakis Date: Fri, 8 May 2015 09:00:39 -0700 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index da2a9aa..4c5c0f6 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,14 @@ You can then apply [security requirement objects](https://github.com/swagger-api end ``` +#### Nested complex objects + +The `key` block simply takes the value you give and puts it directly into the final JSON object. So, if you need to set more complex objects, you can just do: + +```ruby + key :foo, {some_complex: {nested_object: true}} +``` + #### Writing JSON to a file If you are not serving the JSON directly and need to write it to a file for some reason, you can easily use `build_root_json` for that as well: