package
2.1.0+incompatible
Repository: https://github.com/mongodb/mongo-tools-common.git
Documentation: pkg.go.dev

# Functions

ConvertBSONValueToLegacyExtJSON walks through a document or an array and converts any BSON value to its corresponding extended JSON type.
ConvertLegacyExtJSONDocumentToBSON iterates through the document map and converts JSON values to their corresponding BSON values.
ConvertLegacyExtJSONValueToBSON walks through a document or an array and replaces any extended JSON value with its corresponding BSON type.
FindIntByKey returns the value of keyName in the document as an int for either int32 or int64 underlying type.
FindSubdocumentByKey returns the value of keyName in document as a document.
FindValueByKey returns the value of keyName in document.
GetBSONValueAsLegacyExtJSON is equivalent to ConvertBSONValueToLegacyExtJSON, but does not mutate its argument.
GetExtendedBsonD iterates through the document and returns a bson.D that adds type information for each key in document.
MakeSortString takes a bson.D object and converts it to a slice of strings that can be used as the input args to mgo's .Sort(...) function.
ParseLegacyExtJSONValue takes any value generated by the json package and returns a BSON version of that value.
ParseSpecialKeys takes a JSON document and inspects it for any extended JSON type (e.g $numberLong) and replaces any such values with the corresponding BSON type.

# Variables

No description provided by the author

# Type aliases

MarshalD is a wrapper for bson.D that allows unmarshalling of bson.D with preserved order.