File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ sidebar_label: "Getting Started"
1010
1111## Introduction
1212
13- The goal of this project is to create the best all-round JSON library for Scala:
13+ The goal of this project is to create the best all-round BSON library for Scala:
1414
1515- ** Native BSON support** to avoid intermediate JSON conversions and support BSON types.
1616- ** Future-Proof** , prepared for Scala 3 and next-generation Java.
@@ -117,9 +117,9 @@ object Fruit {
117117 implicit val codec : BsonCodec [Fruit ] = DeriveBsonCodec .derive
118118}
119119
120- val jsonFruit = doc( " Banana" -> doc( " curvature" -> double(0.5 ) ))
120+ val bsonFruit = doc( " Banana" -> doc( " curvature" -> double(0.5 ) ))
121121
122- jsonFruit .as[Fruit ]
122+ bsonFruit .as[Fruit ]
123123// Right(Banana(0.5))
124124
125125@ bsonDiscriminator(" $type" )
@@ -133,11 +133,11 @@ object FruitConfigured {
133133 implicit val codec : BsonCodec [FruitConfigured ] = DeriveBsonCodec .derive
134134}
135135
136- val jsonFruitConfigured = doc(
136+ val bsonFruitConfigured = doc(
137137 " $type" -> str(" custom_type_name" ),
138138 " is_poisoned" -> bool(true )
139139)
140140
141- jsonFruitConfigured .as[FruitConfigured ]
141+ bsonFruitConfigured .as[FruitConfigured ]
142142// Right(Apple(true))
143143```
You can’t perform that action at this time.
0 commit comments