Skip to content

Problem serializing arrays #23

@ptallett

Description

@ptallett

Loving this library! Using it loads, just awesome.

I want to serialize an array as a single string:

@JsonProperty()
@JsonElementType(Joint)
public joints: Joint[];

I want a single string, not an array of strings.

I couldn't see a way of doing this, so I had to create my own class JointArray with push/splice methods and then implement a JointArrayConverter. Works but a bit long winded.

It would be nice to be able to specify a custom converter for an array, or even just a pre-serialization method on the parent class.

Cheers,
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions