Untagged

alloy.Untagged
See theUntagged companion object
final case class Untagged()

Implies a different encoding for unions where different alternatives are not tagged. This union type should be avoided whenever possible for performance reasons. However, some third party APIs use it so it is important to be able to represent it. The following union: structure One { a: Int } structure Two { b: String } union Test { one: One two: Two } would normally be encoded in JSON as { "one": { "a": 123 } } When it is annotated with ``@untagged, it is instead encoded as: { "a": 123 }. Therefore the parser will need to try each different alternative in the union before it can determine which one is appropriate.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product