Method: BSON::CodeWithScope#as_extended_json
- Defined in:
- lib/bson/code_with_scope.rb
#as_extended_json(**options) ⇒ Hash
Converts this object to a representation directly serializable to Extended JSON (github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md).
73 74 75 |
# File 'lib/bson/code_with_scope.rb', line 73 def as_extended_json(**) { "$code" => javascript, "$scope" => scope.as_extended_json(**) } end |