Packages

Mongo Agile Library for Elixir, with a micro-language integrated query

Current section

Files

Jump to
mongo_agile lib layers utils object_id jason_encoder_objectid.ex
Raw

lib/layers/utils/object_id/jason_encoder_objectid.ex

defimpl Jason.Encoder, for: BSON.ObjectId do
def encode(bson_id , _args) do
id_string_format = BSON.ObjectId.encode!(bson_id)
id_string_with_json_format = "\"#{id_string_format}\""
id_string_with_json_format
end
end