ObjFW  Diff

Differences From Artifact [56f53a7b7a]:

To Artifact [b4acfa6af4]:

  • File tests/serialization.xml — part of check-in [a6ee2b2065] at 2012-07-31 12:05:46 on branch trunk — Slightly changed serialization format.

    printf's %a was too fragile to serialize floats and doubles, as it was
    behaving differently on different OSes and OS versions. Instead, a hex
    representation of the float/double in big endian is used now. While this
    is less readable, it is guaranteed to be accurate and always the same. (user: js, size: 1636) [annotate] [blame] [check-ins using]


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version='1.0' encoding='UTF-8'?>
<serialization xmlns='https://webkeks.org/objfw/serialization' version='0'>
  <OFMutableDictionary>
    <key>
      <OFArray>
        <OFString>Qu&quot;xbar
test</OFString>
        <OFNumber type='signed'>1234</OFNumber>
        <OFNumber type='double'>0x1.34a456d5cfaadp+10</OFNumber>
        <OFMutableString>asd</OFMutableString>
        <OFDate>0x1.34a456d5cfaadp+10</OFDate>
      </OFArray>
    </key>
    <object>
      <OFString>Hello</OFString>
    </object>
    <key>
      <OFString>Blub</OFString>

|






|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version='1.0' encoding='UTF-8'?>
<serialization xmlns='https://webkeks.org/objfw/serialization' version='1'>
  <OFMutableDictionary>
    <key>
      <OFArray>
        <OFString>Qu&quot;xbar
test</OFString>
        <OFNumber type='signed'>1234</OFNumber>
        <OFNumber type='double'>adfa5c6d454a9340</OFNumber>
        <OFMutableString>asd</OFMutableString>
        <OFDate>adfa5c6d454a9340</OFDate>
      </OFArray>
    </key>
    <object>
      <OFString>Hello</OFString>
    </object>
    <key>
      <OFString>Blub</OFString>