Skip to content

Commit

Permalink
feat(karate): Migrate to JSON component
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectSlayer committed Nov 19, 2024
1 parent cb1d9e9 commit 7e2bb47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions dd-trace-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dependencies {
api project(':dd-trace-api')
api project(':communication')
api project(':internal-api')
implementation project(':components:json:json-io')
implementation project(':components:json:json-path')
implementation project(':utils:container-utils')
implementation project(':utils:socket-utils')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static datadog.communication.http.OkHttpUtils.gzippedMsgpackRequestBodyOf;
import static datadog.communication.http.OkHttpUtils.msgpackRequestBodyOf;
import static datadog.json.buffer.JsonMapper.toJson;

import datadog.communication.serialization.GrowableBuffer;
import datadog.communication.serialization.Writable;
Expand All @@ -20,7 +21,6 @@
import datadog.trace.core.CoreSpan;
import datadog.trace.core.Metadata;
import datadog.trace.core.MetadataConsumer;
import datadog.trace.util.Strings;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
Expand Down Expand Up @@ -357,7 +357,7 @@ public void accept(Metadata metadata) {
if (!(value instanceof Iterable)) {
writable.writeObjectString(value, null);
} else {
String serializedValue = Strings.toJson((Iterable<String>) value);
String serializedValue = toJson((Iterable<String>) value);
writable.writeString(serializedValue, null);
}
}
Expand Down

0 comments on commit 7e2bb47

Please sign in to comment.