Skip to content

Add option to use ListMap instead Map and preserve properties order for untyped deserialization #783

@jneira-stratio

Description

@jneira-stratio

Hi, recently i hit an use case where:

  • it shoud rely on type Any to parse an arbitrary deep json as Map[String,Any]
  • but preserving order of keys

Afaiu the code for untyped json deserialization uses Map in a fixed way.

To change it for preserve order i had to implement a 100 loc class with a new untyped deserializar and rebuild the scala module: https://gist.github.com/jneira-stratio/f0566c79b0284b05bb421d104bd318d7

My first question is if there is another, simpler way to get it working.
Otoh would make sense to add a configuration option to being able to get that behaviour?
It seems to me that it is a relative common use case.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions