From 044d6c65d3eec7fe15b09f301f6034797d31cafe Mon Sep 17 00:00:00 2001 From: kyri-petrou <67301607+kyri-petrou@users.noreply.github.com> Date: Mon, 8 Jul 2024 03:25:26 +0300 Subject: [PATCH] Improve performance of response encoding for jsoniter (#2330) --- core/src/main/scala/caliban/interop/jsoniter/jsoniter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/caliban/interop/jsoniter/jsoniter.scala b/core/src/main/scala/caliban/interop/jsoniter/jsoniter.scala index 12bfab4ea..eb348840d 100644 --- a/core/src/main/scala/caliban/interop/jsoniter/jsoniter.scala +++ b/core/src/main/scala/caliban/interop/jsoniter/jsoniter.scala @@ -67,7 +67,7 @@ private[caliban] object ValueJsoniter { val iter = m.iterator while (iter.hasNext) { val (k, v) = iter.next() - out.writeKey(k) + out.writeNonEscapedAsciiKey(k) encodeInputValue(v, out) } out.writeObjectEnd() @@ -117,7 +117,7 @@ private[caliban] object ValueJsoniter { while (remaining ne Nil) { val (k, v) = remaining.head remaining = remaining.tail - out.writeKey(k) + out.writeNonEscapedAsciiKey(k) encodeResponseValue(v, out) } out.writeObjectEnd()