json - How to serialize OBJECT ARRAY in java? -
this question has answer here:
- how serialize json object in java 4 answers
i have object array, how can serialize array? give c# code , have write in java. thanks. c#:
byte[] data = json.serialize<object[]>(parameters);
please note want serialize array has objects.. realize not exact answer:
objectoutputstream out = new objectoutputstream(anyoutputstream); out.writeobject(objectarray);
i have problem anyoutputstream, don't know should place on parameter..
if object array contains serializable objects can use java.io.objectoutputstream
objectoutputstream out = new objectoutputstream(anyoutputstream); out.writeobject(objectarray); ...
Comments
Post a Comment