Skip to content
Snippets Groups Projects

Remove problematic bigint encoding

Merged Dariusz Rybicki requested to merge fix/bigint-encoding into development
6 files
+ 67
61
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -17,3 +17,21 @@ func convertJsonNumberToString(
}
return output
}
func convertJsonNumberToString(
in input: Data,
minNumberLength: Int
) -> Data {
guard var string = String(data: input, encoding: .utf8) else {
return input
}
string = string.replacingOccurrences(
of: #":( *)([0-9]{\#(minNumberLength),})( *)(,*)"#,
with: #":$1"$2"$3$4"#,
options: [.regularExpression]
)
guard let output = string.data(using: .utf8) else {
return input
}
return output
}
Loading