Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: rel-5-6-0
    • Component/s: None
    • Security Level: Users (General product issues)
    • Labels:
      None
    • QA Testing:
      JUnit test
    • Sprint:
      Green Sprint 106, Green Sprint 107, Green Sprint 108

      Description

      Serializes the passed value (has to be List or Map or variant) into BSON representation (see http://bsonspec.org/spec.html).

      • function byte writeBson(<variant var>|list|map) - It will produce standard BSON.
      • function byte writeExtendedBson(<variant var>|list|map) - It will produce BSON with Clover specific types. It uses “Clover” specific handling of List or “atomic” variant values as these are not directly supported by BSON specification - but should still create valied BSON data.
        variant myvariant;
        myvariant=json2obj('\{"city":"chicago","name":"jon doe","age":"22"}’);
        byte serialized = obj2bson(myvariant);
        printErr(byte2hex(serialized));
        

        Produces following output:

        35000000026369747900080000006368696361676f00026e616d6500080000006a6f6e20646f650002616765000300000032320000
        

        Note: BSON standard does not define (de)serialization of BigDecimal (CTL’s decimal). It is implemented using Clover specific BSON type which would not be compatible with other SW using BSON as an exchange format.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              krivanekm Milan Krivanek
              Reporter:
              botkar Roland Botka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m