Difference between revisions of "Talk:OGP LLSD"

From Second Life Wiki
Jump to navigation Jump to search
 
Line 24: Line 24:
     <binary encoding="base64">/////w==</binary>
     <binary encoding="base64">/////w==</binary>
     <key>signedInteger</key>
     <key>signedInteger</key>
     <int>-1</int>
     <integer>-1</integer>
   </map>
   </map>
</llsd></pre>
</llsd></pre>
Line 33: Line 33:
   <map>
   <map>
     <key>ipAddress</key>
     <key>ipAddress</key>
     <int encoding="ipv4">192.168.1.21</int>
     <integer encoding="ipv4">192.168.1.21</integer>
     <key>unsignedInteger</key>
     <key>unsignedInteger</key>
     <int encoding="unsigned">4294967295</int>
     <integer encoding="unsigned">4294967295</integer>
     <key>signedInteger</key>
     <key>signedInteger</key>
     <int>-1</int>
     <integer>-1</integer>
   </map>
   </map>
</llsd></pre>
</llsd></pre>


it is, however, vaguely problematic in that we would have to add annotation to LLIDL to define the preferred encoding of each element.. though we might be able to simply say that this is a detail for implementations, not the definition of LLIDL. -- [[User:Infinity Linden|Infinity Linden]] 15:12, 1 October 2008 (PDT)
it is, however, vaguely problematic in that we would have to add annotation to LLIDL to define the preferred encoding of each element.. though we might be able to simply say that this is a detail for implementations, not the definition of LLIDL. -- [[User:Infinity Linden|Infinity Linden]] 15:12, 1 October 2008 (PDT)

Latest revision as of 15:51, 1 October 2008

Please add an unsigned 32-bit integer type to LLSD. LLSD XML human readability is shot when it comes to uints, and a lot of time is spent doing the Base64 encoding/decoding. See MU-18. --Eddy Stryker 17:53, 30 September 2008 (PDT)


Eddy...

  1. how much is "a lot of time" ?
  2. what is the alternative binary encoding that you're recommending?
  3. wrt integer encoding.. can't you just assume two's complement and convert negative values to positive ones?

-- Infinity Linden 19:22, 30 September 2008 (PDT)


Hmm.. okay... how's this for an idea...

LLSD is really supposed to be an abstract syntax *yeah... i know... why are we defining int's as being signed and 32 bits wide in an abstract syntax* but the XML serialization really is an XML serialization, not the definition of LLSD. Maybe we could specify that concrete implementations of integers MUST support 32 bits of 2s complement integer (as most all modern systems do). We could then add ( signed, unsigned and IPV4) as encodings of the int element of the XML serialization, the same way that we are thinking of supporting base64 and base16 encodings of binary elements. so... where you would have something like this now:

<llsd>
  <map>
    <key>ipAddress</key>
    <binary encoding="base16">1501A8C0</binary>
    <key>unsignedInteger</key>
    <binary encoding="base64">/////w==</binary>
    <key>signedInteger</key>
    <integer>-1</integer>
  </map>
</llsd>

we would have something like this:

<llsd>
  <map>
    <key>ipAddress</key>
    <integer encoding="ipv4">192.168.1.21</integer>
    <key>unsignedInteger</key>
    <integer encoding="unsigned">4294967295</integer>
    <key>signedInteger</key>
    <integer>-1</integer>
  </map>
</llsd>

it is, however, vaguely problematic in that we would have to add annotation to LLIDL to define the preferred encoding of each element.. though we might be able to simply say that this is a detail for implementations, not the definition of LLIDL. -- Infinity Linden 15:12, 1 October 2008 (PDT)