Giter VIP home page Giter VIP logo

astream's People

Contributors

kokorin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yoursoultree

astream's Issues

HashMap idea

In several places spicefactory's Map is used. It simply compares keys one by one.
Possibly it would be faster to compute hash of key for every getValue() and put() methods call.
Objects can be wrote to ByteArray to get byte sequence.

Array and IList item type

There is ArrayElementType metadata in Flex.
Simular metadata would be usefull for IList.
Add processing of collection's item type to MetadataProcessor

XStream interoperability

Java arrays and maps have no corresponding types in AStream yet.

Java XML AS3
byte[] byte-array ByteArray
String[] string-array Vector.<String>
java.util.ArrayList list org.spicefactory.lib.collection.List
java.util.HashMap map org.spicefactory.lib.collection.Map

Escape characters

Some characters does'n always get escaped in generated XML.
"Quot " Apos ' amp & lt < gt > Me!" becomes
Quot " Apos ' amp & lt < gt > Me!

Old AStream XML not working with latest build

"[Fault] exception, information=ReferenceError: Specified ApplicationDomain does not contain the class vector-Item"

@

public function fromXML(xml:XML):Object {
reset();
const mapper:Mapper = registry.getMapper(xml.localName());
var result:Object;
try {
result = mapper.fromXML(xml, ref);
} finally {
ref.clear();
}
return result;
}

Worked before I swapped to the latest build.

Here is the XML I am reading in...

<vector-Item>
<Item id="Data_Spawn">
<Paths>
<Path type="Text" path="assets/data/spawndata.xml"/>
</Paths>
</Item>
</vector-Item>

Async to and from XML

An application hangs while Parsing big XML. Async variants of functions can help in this case.

Date format

Possibly we need to add to and form String converters.

ChildElementHandler and custom mapper

If custom mapper is registered on property AND property is set to subclass of declared type, than custom mapper won't be used!

[AStreamMapper("MyMapper")]
public var property:MyClass = new MySubClass();

Check null item serialization in implicit collection

In XStream implicit collections with null item are serialized like this:
<Parent>
<child>...</child>
<null/>
<child>...</child>
</Parent>

Currently in AStream Error is thrown:
Error: Instance must not be null
at org.spicefactory.lib.reflect::ClassInfo$/forInstance()[D:\Projects\AStream\Spicelib-Reflect\src\main\org\spicefactory\lib\reflect\ClassInfo.as:126]
at ru.kokorin.astream.ref::NoRef/addValue()[D:\Projects\AStream\AStream\src\ru\kokorin\astream\ref\NoRef.as:13]
at ru.kokorin.astream.mapper::ComplexMapper/fillXML()[D:\Projects\AStream\AStream\src\ru\kokorin\astream\mapper\ComplexMapper.as:89]
at Function/()[D:\Projects\AStream\AStream\src\ru\kokorin\astream\mapper\ComplexMapper.as:219]
at Array$/_forEach()
at Array/http://adobe.com/AS3/2006/builtin::forEach()
at ru.kokorin.astream.util::TypeUtil$/forEachInCollection()[D:\Projects\AStream\AStream\src\ru\kokorin\astream\util\TypeUtil.as:106]
at ImplicitCollectionHandler/toXML()[D:\Projects\AStream\AStream\src\ru\kokorin\astream\mapper\ComplexMapper.as:217]

Problem with property order

In AS3 describeType can return properties in wrong order.
It can lead to wrong deserialization if no AStreamOrder metadata is specified.

Ambiguous reference to List

Found in all the areas that require the "List" structure.

I solved it by making the reference absolute:

org.spicefactory.lib.collection.List

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.