File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ import com.github.plokhotnyuk.jsoniter_scala.core._
5
5
val jsonCodec : JsonValueCodec [Unit ] = new JsonValueCodec [Unit ] {
6
6
override def decodeValue (in : JsonReader , default : Unit ): Unit = decode(in, 1024 ) // Max depth is 1024
7
7
8
- override def encodeValue (x : Unit , out : JsonWriter ): Unit = ???
8
+ override def encodeValue (x : Unit , out : JsonWriter ): Unit = ()
9
9
10
10
override def nullValue : Unit = ()
11
11
12
12
private [this ] def decode (in : JsonReader , depth : Int ): Unit = {
13
13
val b = in.nextToken()
14
14
if (b == '"' ) {
15
15
in.rollbackToken()
16
- in.readStringAsCharBuf()
16
+ val _ = in.readStringAsCharBuf()
17
17
} else if (b == 'f' || b == 't' ) {
18
18
in.rollbackToken()
19
- in.readBoolean()
19
+ val _ = in.readBoolean()
20
20
} else if ((b >= '0' && b <= '9' ) || b == '-' ) {
21
21
in.rollbackToken()
22
- in.readFloat()
22
+ val _ = in.readFloat()
23
23
} else if (b == '[' ) {
24
24
val depthM1 = depth - 1
25
25
if (depthM1 < 0 ) in.decodeError(" depth limit exceeded" )
You can’t perform that action at this time.
0 commit comments