Skip to content

Commit

Permalink
Collections serialization support in DefaultQWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejlach committed Oct 6, 2015
1 parent 58dada5 commit 8997c3b
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 122 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
------------------------------------------------------------------------------

- API redesign: enable custom serializers & deserializers
- Collections serialization support in DefaultQWriter
- Improve memory reuse in QWriter
- Improve performance while iterating over QTable, QDictionary
and QKeyedTable: partial reimplementation of java.lang.reflect.Array
Expand Down
10 changes: 10 additions & 0 deletions doc/Type-conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ Note that q list are represented as arrays of primitive type by the qJava
library. It is possible to send to q arrays of primitive type (e.g. `int[]`) as
well as of boxed type (e.g. `Integer[]`).

`DefaultQWriter` supports serialization of Java `Collection`s. Q type is
derived from the first element of the `Collection`, e.g.:

```java
new ArrayList<Integer>(Arrays.asList(new Integer[] { 0, 1, 2, 3 })); // serialized as integer list
new ArrayList<Object>(Arrays.asList(new Object[] { null, 2, 3, "test" })); // serialized as general list

new ArrayList<Object>(Arrays.asList(new Object[] { 1, "test" })); // serialization error, assumed to be integer-only list
```

### Temporal types
q language provides multiple types for operating on temporal data. The qJava
library provides a corresponding temporal class for each q temporal type.
Expand Down
Loading

0 comments on commit 8997c3b

Please sign in to comment.