# How to save list in java and read it in python

**URL:** https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494
**Category:** Client Libraries
**Tags:** llist, java, python
**Created:** [February 12, 2016, 11:47pm UTC](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494 "2016-02-12T23:47:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tivvit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/tivvit/32/314_2.png) [@tivvit](https://discuss.aerospike.com/u/tivvit)
#### Post date: [February 12, 2016, 11:47pm UTC](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494/1 "2016-02-12T23:47:42Z")

</div>

Hi,

I am wondering if I can save ArrayList in java client and read it from python.

When i do this:

> <https://github.com/aerospike/aerospike-client-java/blob/master/examples/src/com/aerospike/examples/ListMap.java#L54>

and read the record from python I get segfault. In AQL I see binary data, so I suppose that the value is java serialized, is there any way to convert the data to aerospike list type.

Thanks

---

<div class="post-metadata">

### Author: ![tivvit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/tivvit/32/314_2.png) [@tivvit](https://discuss.aerospike.com/u/tivvit)
#### Post date: [February 13, 2016, 11:12am UTC](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494/2 "2016-02-13T11:12:54Z")

</div>

I know that I may use JSON but I think that native aerospike data types will be much more efficient.

---

<div class="post-metadata">

### Author: ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)
#### Post date: [February 13, 2016, 4:59pm UTC](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494/3 "2016-02-13T16:59:09Z")

</div>

Can you open this as an issue in [aerospike/aerospike-client-python](https://github.com/aerospike/aerospike-client-python)? At worst case it should be deserialized to a Python bytearray, rather than segfault. Would be good to know the version of the Python client this is happening for (and whether it’s still an issue with the [2.0.0 release](https://github.com/aerospike/aerospike-client-python/releases/tag/2.0.0)).

Otherwise, it’s the kind of thing that’s bound to happen unless you’re very strict about the data types you’re using across different languages, so it makes sense to use a common custom serializer/deserializer such as MsgPack.
