Skip to content

Commit

Permalink
made json remove backslashes from keys
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoSax committed Aug 28, 2023
1 parent cb68c81 commit 5c282ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Sources/ReplicantSwift/Config/ReplicantClientConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ public struct ReplicantClientConfig
public func createJSON() -> Data?
{
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted

encoder.outputFormatting.insert(.prettyPrinted)
encoder.outputFormatting.insert(.withoutEscapingSlashes)

do
{
let configData = try encoder.encode(self)
Expand Down
3 changes: 2 additions & 1 deletion Sources/ReplicantSwift/Config/ReplicantServerConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public struct ReplicantServerConfig
public func createJSON() -> Data?
{
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
encoder.outputFormatting.insert(.prettyPrinted)
encoder.outputFormatting.insert(.withoutEscapingSlashes)

do
{
Expand Down

0 comments on commit 5c282ca

Please sign in to comment.