Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.1 #15

Merged
merged 3 commits into from
Feb 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: names and refs
  • Loading branch information
DMBerlin committed Feb 4, 2024
commit de5e3d6a70d3844369ea1881c4918493926f79e2
4 changes: 2 additions & 2 deletions src/utils/json-tree-parsing.utils.spec.ts
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ describe("Tree Json Parsing", () => {
"{ \"key\": \"value\", \"data\": \"{ \\\"nested\\\": \\\"nested value\\\" }\" }",
],
// eslint-disable-next-line
message: "This is a \"quoted\" message",
message: 'This is a "quoted" message',
},
};

@@ -76,7 +76,7 @@ describe("Tree Json Parsing", () => {
it("should flat different levels of escaped strings", () => {
const data =
// eslint-disable-next-line
"{\"name\": \"John Doe\",\"age\": \"30\",\"location\": {\"city\": \"Some City\",\"state\": \"Some State\",\"geo\": \"{\\\"lat\\\": \\\"40000\\\",\\\"lng\\\": \\\"40000\\\"}\"},\"rules\": {\"localWork\": \"true\",\"onlineWork\": \"true\",\"applications\": {\"admin\": \"true\",\"time\": \"no-time\"}},\"availability\": \"{\\\"online\\\": \\\"true\\\"}\"}";
'{"name": "John Doe","age": "30","location": {"city": "Some City","state": "Some State","geo": "{\\"lat\\": \\"40000\\",\\"lng\\": \\"40000\\"}"},"rules": {"localWork": "true","onlineWork": "true","applications": {"admin": "true","time": "no-time"}},"availability": "{\\"online\\": \\"true\\"}"}';

expect(treeParsing(data)).toMatchObject({
name: "John Doe",