Skip to content

Excluding type tag from json #77

@arshadalis

Description

@arshadalis

Is there a way to exclude the discriminator type tag from the output json.
For example

sealed trait Foo
case class Bar(s :String, w: Long) extends Foo
case class Baz(q : String, p: Int) extends Foo

the output json should be
lets say for Bar

{
"s": "someabc"
"w": 12
}

i.e. It should not include "_type": "Bar" in the json.

I found following are the ways to customise the type tag

TypeTagSetting.ShortClassName
TypeTagSetting.FullClassName
TypeTagSetting.UserDefinedName

Is there a way to disable it ?

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