...

Text file src/go.mongodb.org/mongo-driver/testdata/bson-corpus/timestamp.json

Documentation: go.mongodb.org/mongo-driver/testdata/bson-corpus

     1{
     2    "description": "Timestamp type",
     3    "bson_type": "0x11",
     4    "test_key": "a",
     5    "valid": [
     6        {
     7            "description": "Timestamp: (123456789, 42)",
     8            "canonical_bson": "100000001161002A00000015CD5B0700",
     9            "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }"
    10        },
    11        {
    12            "description": "Timestamp: (123456789, 42) (keys reversed)",
    13            "canonical_bson": "100000001161002A00000015CD5B0700",
    14            "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }",
    15            "degenerate_extjson": "{\"a\" : {\"$timestamp\" : {\"i\" : 42, \"t\" : 123456789} } }"
    16        },
    17        {
    18            "description": "Timestamp with high-order bit set on both seconds and increment",
    19            "canonical_bson": "10000000116100FFFFFFFFFFFFFFFF00",
    20            "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4294967295, \"i\" :  4294967295} } }"
    21        },
    22        {
    23            "description": "Timestamp with high-order bit set on both seconds and increment (not UINT32_MAX)",
    24            "canonical_bson": "1000000011610000286BEE00286BEE00", 
    25            "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4000000000, \"i\" :  4000000000} } }"
    26        }
    27    ],
    28    "decodeErrors": [
    29        {
    30            "description": "Truncated timestamp field",
    31            "bson": "0f0000001161002A00000015CD5B00"
    32        }
    33    ]
    34}

View as plain text