WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

What is in this data? #6

@dvarrazzo

Description

@dvarrazzo

Looking at the content of this test file:

$ curl -s -L https://github.com/ubjson/universal-binary-json-java/raw/master/src/test/resources/org/ubjson/CouchDB4k.ubj | xxd | head
00000000: 6f09 7305 6461 7461 3373 5e43 6f6c 7265  o.s.data3s^Colre
00000010: 5548 4174 7559 6f55 4f78 314e 345a 6c6f  UHAtuYoUOx1N4Zlo
00000020: 6f75 5174 326f 3675 676e 5554 3665 5974  ouQt2o6ugnUT6eYt
00000030: 5331 3067 7537 6e69 4d38 6930 7645 694e  S10gu7niM8i0vEiN
00000040: 7566 706b 3152 6c4d 5158 6148 586c 4977  ufpk1RlMQXaHXlIw
00000050: 5142 4473 4d46 4446 5551 6346 6567 3276  QBDsMFDFUQcFeg2v
00000060: 5735 6544 3235 3958 6d73 0564 6174 6134  W5eD259Xms.data4
00000070: 736e 7a43 7872 694a 684c 3732 3657 4e4e  snzCxriJhL726WNN
00000080: 5464 4a4a 7a75 7267 5341 3876 4b54 3672  TdJJzurgSA8vKT6r
00000090: 4841 3063 4643 6239 6b6f 5a63 4c55 4d58  HA0cFCb9koZcLUMX

what is the initial o character? It's not in the specs. The py-ubjson library chokes on it:

>>> ubjson1 = requests.get("https://raw.githubusercontent.com/ubjson/universal-binary-json-java/master/src/test/resources/org/ubjson/CouchDB4k.ubj").content

>>> y = ubjson.loadb(ubjson1)
---------------------------------------------------------------------------
DecoderException                          Traceback (most recent call last)
<ipython-input-20-42c4adaf9be8> in <module>
----> 1 y = ubjson.loadb(ubjson1)

DecoderException: ('Invalid marker (at byte 1)', 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions