Skip to content

Commit 3a6373f

Browse files
committed
Unescape slahes in Inspect.dump
1 parent 5b4b7ac commit 3a6373f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Sources/ServiceStack/Inspect.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public class Inspect {
6060
encoder.outputFormatting = .prettyPrinted
6161
if let data = try? encoder.encode(obj) {
6262
let json = String(data: data, encoding: .utf8)!
63-
return json.replacingOccurrences(of:"\"", with: "")
63+
return json
64+
.replacingOccurrences(of:"\"", with: "")
65+
.replacingOccurrences(of:"\\/", with: "/")
6466
} else {
6567
var toStr = String()
6668
Swift.dump(obj, to:&toStr)

Tests/ServiceStackTests/AutoQueryTests.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class AutoQueryTests: XCTestCase {
3838

3939
do {
4040
let response = try client.get(request)
41-
41+
42+
// Inspect.printDump(response)
4243
XCTAssertEqual(response.total, 15)
4344
XCTAssertEqual(response.results.count, 3)
4445
let names = response.results.map { $0.name! }.joined(separator: ",")

0 commit comments

Comments
 (0)