Latif Khalifa
ae112d56fb
Update copyright notices
2014-02-25 15:31:10 +01:00
Latif Khalifa
5ba075615c
Be standards compliant when dealing with JSON serialization of NaN and Inf floats
...
Patch by dahla
2013-12-27 21:55:08 +01:00
Revolution Smythe
4466e0c9db
Merge branch 'master' of git://github.com/openmetaversefoundation/libopenmetaverse
...
Conflicts:
bin/log4net.dll
2013-03-06 21:05:49 -05:00
Latif Khalifa
61b7c70c65
Some grids send UTF-8 bom char with their xml response
2013-02-24 01:25:54 +01:00
Revolution Smythe
37597a448e
Merge in the changes from the original Aurora-LibOMV branch (missing a few optimizations that change a lot of base types, not included as I'd rather stick closer to master at this point).
2012-07-27 13:39:21 -04:00
Latif Khalifa
9efec5cef7
Bring binary serialized OSD in line with reference implementation
...
by Linden Lab's python LLSD parsers:
https://bitbucket.org/lindenlab/llbase/src/78beb7385d87/llbase/llsd.py
Patch by: Dahlia Trimble
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3592 52acb1d6-8a22-11de-b505-999d5b087335
2011-12-02 04:44:34 +00:00
Latif Khalifa
e294702a0b
Don't append .0 to NaN floats when serializing JSON
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3582 52acb1d6-8a22-11de-b505-999d5b087335
2011-09-10 11:20:58 +00:00
Latif Khalifa
57dca5a748
Make adding header as specified default for LLSD/Binary serialization.
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3549 52acb1d6-8a22-11de-b505-999d5b087335
2011-06-10 13:37:53 +00:00
Latif Khalifa
66d92f135e
[API Change] Skip appending <? llsd/binary ?> header. Add overload that supports it.
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3548 52acb1d6-8a22-11de-b505-999d5b087335
2011-06-10 12:56:19 +00:00
Latif Khalifa
ab15645ace
LIBOMV-913: OSDDate does not properly serialize/deserialize
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3547 52acb1d6-8a22-11de-b505-999d5b087335
2011-06-10 11:53:08 +00:00
Latif Khalifa
a02a3697da
LIBOMV-879: Fixed deserialization of nested arrays
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3463 52acb1d6-8a22-11de-b505-999d5b087335
2010-10-30 05:20:49 +00:00
Latif Khalifa
6fc54a43f0
Removed optional parameter to DeserializeLLSDBinary(), decode binary serialized data both with and without the <? LLSD/Binary ?> header.
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3456 52acb1d6-8a22-11de-b505-999d5b087335
2010-10-15 22:00:58 +00:00
Latif Khalifa
822db877d3
Docu fix
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3454 52acb1d6-8a22-11de-b505-999d5b087335
2010-10-15 01:08:34 +00:00
Latif Khalifa
9d0a95ea95
LIBOMV-875 (Allow LLSD/binary header to be optional)
...
Added optional second paramater "headersOptional" which when set to true
will not throw an exception when deserializing headerless binary LLSD.
Default behavior unchanged.
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3452 52acb1d6-8a22-11de-b505-999d5b087335
2010-10-15 01:00:48 +00:00
John Hurliman
3689169391
* Setting all of the OSD type classes as sealed
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3427 52acb1d6-8a22-11de-b505-999d5b087335
2010-08-18 00:05:19 +00:00
John Hurliman
22524b9ef4
* Added OSD implicit typecasts going the other direction (assigning an OSD object to a native value)
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3426 52acb1d6-8a22-11de-b505-999d5b087335
2010-08-17 19:25:06 +00:00
John Hurliman
2746bdaa70
* Added implicit typecasts from bool/int/uint/short/ushort/sbyte/byte/long/ulong/double/float/string/UUID/DateTime/Uri/byte[]/Vector2/Vector3/Vector3d/Vector4/Quaternion/Color4 to OSD. You can now write code like "OSDArray array = new OSDArray { true, 42, Vector3.UnitX, 1.5 };"
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3425 52acb1d6-8a22-11de-b505-999d5b087335
2010-08-17 19:02:16 +00:00
John Hurliman
2ebc810d72
* Finished OAR file loading
...
* Small performance optimization in JsonMapper.cs
* Added message definitions for new capabilities
* Added (currently unused) new enum values
* Updated to a more recent version of log4net.dll
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3397 52acb1d6-8a22-11de-b505-999d5b087335
2010-07-26 18:01:40 +00:00
Latif Khalifa
4778946b7c
* Support for non absolute URIs
...
* Fix test (URIs now return escaped strings)
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3367 52acb1d6-8a22-11de-b505-999d5b087335
2010-06-28 22:11:53 +00:00
John Hurliman
f108207698
* Fixed a bug in BitPack where existing 1 bits were not being overwritten by new 0 bits
...
* Added BitPack.PackBit()
* Made Binary LLSD deserialization more lenient when parsing the header. Tests pass again
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3364 52acb1d6-8a22-11de-b505-999d5b087335
2010-06-25 01:24:11 +00:00
John Hurliman
64f990fa38
* Fixed JSON serialization for null/undefined values
...
* Added MappingType.Spherical and MappingType.Cylindrical enum values
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3361 52acb1d6-8a22-11de-b505-999d5b087335
2010-06-05 14:12:24 +00:00
John Hurliman
2c234d9c14
* Fixed OSDUri.AsString()/ToString() to return the escaped Uri instead of the pretty-printed version. " http://example/a%20space/ " instead of " http://example/a space"
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3360 52acb1d6-8a22-11de-b505-999d5b087335
2010-06-05 08:17:57 +00:00
John Hurliman
f5a84b39aa
* LLSD JSON serialization can now take an optional parameter to enable/disable preserving default values in serialization
...
* Fixed a regression where OSDMap.ToString() and OSDArray.ToString() were pruning default values after switching from notation output to JSON
* Fixed LLSD decoding to ignore case when parsing headers and use <? llsd/binary ?> instead of <?llsd/binary?>
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3357 52acb1d6-8a22-11de-b505-999d5b087335
2010-05-25 23:07:16 +00:00
John Hurliman
06bc4580a6
* Changed OSDArray.ToString() and OSDMap.ToString() to use JSON formatting instead of the deprecated LLSD notation format
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3353 52acb1d6-8a22-11de-b505-999d5b087335
2010-05-24 18:23:39 +00:00
Latif Khalifa
613e6a25e8
LIBOMV-798: OSDParser.DeserializeJson() throws an exception on null values
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3273 52acb1d6-8a22-11de-b505-999d5b087335
2010-03-13 11:17:48 +00:00
John Hurliman
6aa8541313
* OSDParser.SerializeJson*() will no longer store key/value pairs in serialized maps for default values. This saves memory overhead and reduces the footprint of serialized JSON data while staying compatible with the spec
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3239 52acb1d6-8a22-11de-b505-999d5b087335
2009-12-02 20:51:01 +00:00
John Hurliman
a5cc49b4d6
Going through ridiculous contortions to prevent OpenMetaverse.StructuredData.dll from crashing on Mono while decoding JSON objects
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3066 52acb1d6-8a22-11de-b505-999d5b087335
2009-08-06 19:37:33 +00:00
John Hurliman
3f403efd5e
* Adding an OSDParser.Deserialize() overload that takes a string
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2848 52acb1d6-8a22-11de-b505-999d5b087335
2009-06-05 06:27:43 +00:00
John Hurliman
c5409af63f
* [LIBOMV-506] Complete rewrite of CapsBase to use HttpWebRequest instead of our homebrewed WebRequest hack. We lose the upload progress callback but gain IOCP thread instead of System.Thread usage and Keep-Alive support
...
* Content-Types described in http://tools.ietf.org/html/draft-hamrick-llsd-00 are used for CAPS requests. This *may* be incompatible with the current SL grid, needs testing
* Modified CapsClient requests to require OSDFormat enum and timeout values
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2680 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-01 06:04:32 +00:00
John Hurliman
95a4f7fd7e
* Fixing [LIBOMV-504] reported by Eves Sinister, OSDParser.Deserialize() now handles LLSDXML that starts with <?xml
...
* Cleaned up the Cable Beach inventory API and added LLIDL for prim serialization. This is still a proposal and no serialization/deserialization exists yet
* Updated content types and file extensions used by Cable Beach to match the table at https://wiki.secondlife.com/wiki/Asset_System
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2674 52acb1d6-8a22-11de-b505-999d5b087335
2009-04-29 17:21:46 +00:00
John Hurliman
17ce11acc1
* Added KeyValuePair overloads for DoubleDictionary.ForEach()
...
* Fixed conversions from OSDArray to long, ulong, and uint
* More Cable Beach messages and tweaks
* Initial commit of the Cable Beach message template (LLIDL)
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2647 52acb1d6-8a22-11de-b505-999d5b087335
2009-04-23 20:41:37 +00:00
John Hurliman
5f4b80c298
Added OSDParser.Deserialize(), a new command to automatically try and guess the content type for LLSD data and decode it. Errors on the side of JSON, so avoid using this function for libomv SL functions (which typically use XML)
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2638 52acb1d6-8a22-11de-b505-999d5b087335
2009-04-20 23:45:31 +00:00
John Hurliman
7da023fbd4
* Renamed OSDURI to OSDUri (shouldn't affect anyone)
...
* Fixed OSD handling for invalid or null Uri values
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2605 52acb1d6-8a22-11de-b505-999d5b087335
2009-04-15 19:38:57 +00:00
John Hurliman
f48c9922e9
* Added OpenMetaverse.Messages.Linden and OpenMetaverse.Messages.Simian namespaces to hold LLSD serialized messages. The dawn of a new era for libomv!
...
* Changing LLSD JSON serialization to match the draft at http://tools.ietf.org/html/draft-hamrick-llsd-00 (first breaking change since 0.6.0)
* Moving some enums out to OpenMetaverseTypes.dll
* Adding conversion methods to go to and from the newly moved enums
* Moved Parcel enums out to the main namespace
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2588 52acb1d6-8a22-11de-b505-999d5b087335
2009-04-09 01:17:40 +00:00
John Hurliman
42cc1ee3b7
* Fixed a bug converting an empty OSD element to a Uri
...
* Lock the old CircularQueue in the CircularQueue copy constructor
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2543 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-26 05:13:07 +00:00
John Hurliman
26e0e50615
* Fixed two failing OSD tests. OSDReal.AsString() now uses a slower but more accurate method to produce values that will always round-trip. A random "B" character was removed from the XmlSD DeserializeLLSDSample() test
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2508 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-19 18:15:49 +00:00
John Hurliman
46450da1ee
* Reverts an accidental change to Utils.IntToBytes()
...
* Adds Utils.IntToBytesBig and Utils.DoubleToBytesBig()
* OSD.AsBinary() functions use big-endian functions where necessary
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2507 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-19 17:57:12 +00:00
Jim Radford
fb6376d2b6
LIBOMV-460 LIBOMV-423 BinaryLLSD Unit Tests Failing, this appears to be caused by an Endian issue
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2506 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-19 17:19:23 +00:00
John Hurliman
3ad7551a4a
* Added Utils.EmptyBytes which is equal to new byte[0] and replaced all references of new byte[0] to Utils.EmptyBytes
...
* Added a CRC32 implementation to OpenMetaverseTypes.dll
* Added ToBytes() functions to most of the OMV types for writing bytes into an existing byte array
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2470 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-06 01:32:02 +00:00
John Hurliman
06404ab4e4
* Fixed endianness for OSD handling of uint, long, and ulong (big endian byte arrays are used)
...
* Fixed CapsServer to handle all content types (old SL clients were sending application/xml, new ones send application/llsd+xml)
* Start the EventQueue ID at 1 (seems to help)
* HyperGrid teleporting is now working in Simian
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2428 52acb1d6-8a22-11de-b505-999d5b087335
2009-02-05 03:12:41 +00:00
John Hurliman
808b681b83
* Fixed a nasty OSD->JSON bug that was producing invalid JSON for empty arrays or dictionaries
...
* Several fixes in OpenMetaverse.Http.CapsServer and OpenMetaverse.Http.EventQueueServer (this is the first time they've been tested)
[Simian]
* Initial capabilities and EventQueue support (appears to be working)
* HyperGrid is almost working
* More cleanup with how agents are removed from the scene
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2427 52acb1d6-8a22-11de-b505-999d5b087335
2009-02-04 23:00:33 +00:00
John Hurliman
364c2c26d9
* Moved all capabilities code to the new library, OpenMetaverse.Http
...
* OpenMetaverse.Http contains a CAPS client + server, event queue client + server, SSL certificate generation (root CA, server certs, client certs), and client certificate authentication
* HttpServer.dll and Mono.Security.dll are new dependencies for OpenMetaverse.Http.dll
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2400 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-29 20:44:28 +00:00
John Hurliman
a5ede98e87
* Added more DateTime/string/integer/float conversion methods for OSD types
...
* Slight fix to default output for login response serialization
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2377 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-11 01:36:47 +00:00
John Hurliman
66669a773c
* Added method to serialize OSD to a JsonWriter
...
* Added more OSD.As*() functions to match the OSD.From*() functions
* Added more Utils.BytesTo*() functions
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2376 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-10 02:54:50 +00:00
John Hurliman
4b1f441574
* Sanity check in DeserializeLLSDXml() to return an empty LLSD block instead of throwing an exception
...
* Removing redundant code from OpenMetaverse.Utilities
* Using System.Diagnostics.StopWatch instead of Environment.TickCount for rate limiting, and speeding up packet sending from 75ms gaps to 10ms (might be slightly too fast, but it works for me)
* Cleaning up the logic a big in RequestAllSimParcels()
* Try/catch block in GridProxy around packet delegates
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2371 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-05 01:34:24 +00:00
John Hurliman
dd408d38fb
* Fixed JSON->OSD deserialization error on empty strings
...
* Fixed exception strings in OpenJPEG.cs
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2369 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-01 23:58:45 +00:00
John Hurliman
0c502322f9
Cleaning up comments in JSON code to avoid visual studio complaints
...
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2363 52acb1d6-8a22-11de-b505-999d5b087335
2008-11-19 00:32:05 +00:00
John Hurliman
5fbcd0c4d6
* Moved OpenMetaverse.StructuredData to a separate library
...
* Added experimental JSON serialization/deserialization to OSD using LitJSON (works, but subject to change soon)
* Moved packet handling code out of Simian.cs
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2361 52acb1d6-8a22-11de-b505-999d5b087335
2008-11-18 03:16:38 +00:00