Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Excessive tpe entries on json array elements #210

@julianrz

Description

@julianrz

When serializing an array (likely, any collection) to JSON, each element of resulting JSON array contains the (potentially lengthy - long package name!) "tpe" entry. This is redundant, since the array itself already has a tpe entry with full information on element type. If a long array is serialized, current behavior would result in a file which is a lot larger than it has to be

val um = CommitUrlEmail("a","b")
val um2 = CommitUrlEmail("a2","b2")
val umList= Array(um,um2)
val pklumList = umList.pickle
println(pklumList.value)

[  "tpe": "scala.Array[long.loog.long.long.pkg.name.CommitUrlEmail]",
  "elems": [
    {
    "tpe": "long.loog.long.long.pkg.name.CommitUrlEmail",
    "commitUrl": "a",
    "email": "b"
  },
    {
    "tpe": "long.loog.long.long.pkg.name.CommitUrlEmail",
    "commitUrl": "a2",
    "email": "b2"
  }
  ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions