<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> 
<dfn>BSON</dfn>
は
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MongoDB</anchor>
の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">データ形式</anchor>の1つです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">BSON</anchor>
は
Binary JSON
の略とされていますが、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JSON</anchor> とは特に関係ない <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JSONもどき</anchor>の一種です。</p><section><h1>仕様書</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite>BSON - Binary JSON</cite>
( (<time>2014-03-24 14:09:10 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://bsonspec.org/">http://bsonspec.org/</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite xml:lang="en">specifications/subtype6.rst at master · mongodb/specifications · GitHub</cite>, <time>2023-04-17T05:20:42.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/subtype6.rst">https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/subtype6.rst</anchor-external></p></section><section><h1>データ型</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">正規表現</anchor>,
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UUID</anchor>,
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MD5</anchor>,
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JavaScriptコード</anchor></p><section><h1>BSON における日時</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> 次の2つの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">日時データ型</anchor>があります <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;1</anchor-internal></src>。</p><blockquote><p>UTC datetime - The int64 is UTC milliseconds since the Unix epoch.</p><p>Timestamp - Special internal type used by MongoDB replication and sharding. First 4 bytes are an increment, second 4 are a timestamp.</p></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> 
<dfn>UTC datetime</dfn> は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ミリ秒Unix time</anchor>。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MongoDB Extended JSONにおける日時</anchor>も参照。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> 
<cite xml:lang="en">BSON Types — MongoDB Manual</cite>, <time>2023-04-07T17:37:20.000Z</time>, <time>2023-04-17T06:13:40.927Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps">https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps</anchor-external></p></section></section><section><h1>実装</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite xml:lang="en">GitHub - mongodb/js-bson: BSON Parser for node and browser</cite>, <time>2021-09-21T06:34:29.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/mongodb/js-bson">https://github.com/mongodb/js-bson</anchor-external></p></section><section><h1>関連</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MongoDB Extended JSON</anchor></p></section><section><h1>メモ</h1></section></body></html>