struct BSON::Code

Overview

JavaScript code.

Defined in:

bson/code.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(code : String, scope : BSON | Nil = nil) #

[View source]

Instance Method Detail

def code : String #

[View source]
def scope : BSON? #

[View source]
def to_canonical_extjson(builder : JSON::Builder) #

Serialize to a canonical extended json representation.

NOTE see https://github.com/mongodb/specifications/blob/master/source/extended-json.rst


[View source]
def to_json(builder : JSON::Builder) #

[View source]