Skip to content

Commit e965847

Browse files
committed
Update: Using hipjson from dub registry, now borrowing data from strings in json parsing
1 parent c3f3045 commit e965847

File tree

20 files changed

+140
-1486
lines changed

20 files changed

+140
-1486
lines changed

adv_diff/dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Marcelo Silva Nascimento Mancini"
44
],
55
"dependencies": {
6-
"hipjson": {"path": "../hipjson"}
6+
"hipjson": "*"
77
},
88
"copyright": "Copyright © 2024, Marcelo Silva Nascimento Mancini",
99
"description": "An advanced diff checker. Used for files and paths.",

adv_diff/source/redub/libs/adv_diff/files.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Beyond that, it also provides a cache composition formula.
55
*/
66
module redub.libs.adv_diff.files;
7-
public import hipjson;
7+
public import hip.data.json;
88
import std.exception;
99
import std.file;
1010

dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"semver": {"path": "semver"},
3737
"colorize": {"path": "colorize"},
3838
"adv_diff": {"path": "adv_diff"},
39-
"hipjson": {"path": "hipjson"},
39+
"hipjson": "~>1.0.6",
4040
"d_dependencies": {"path": "d_dependencies"},
4141
"dub_sdl_to_json": {"path": "dub_sdl_to_json"},
4242
"package_suppliers": {"path": "package_suppliers"},

dub_sdl_to_json/dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"sdlite": "~>1.3.0",
77
"adv_diff": {"path": "../adv_diff"},
8-
"hipjson": {"path": "../hipjson"}
8+
"hipjson": "*"
99
},
1010
"copyright": "Copyright © 2024, Marcelo",
1111
"description": "A minimal D application.",

dub_sdl_to_json/source/dub_sdl_to_json.d

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module dub_sdl_to_json;
2-
public import hipjson;
2+
public import hip.data.json;
33
import sdlite;
44
import core.stdc.math;
55

@@ -308,10 +308,10 @@ string fixSDLParsingBugs(string sdlData)
308308
enum lb = "\r\n";
309309
else
310310
enum lb = "\n";
311-
311+
312312
sdlData = stripComments(sdlData);
313313
sdlData = sdlData.replace("\\"~lb, " ");
314-
314+
315315

316316
/*
317317
Now replace things like:
@@ -326,12 +326,12 @@ string fixSDLParsingBugs(string sdlData)
326326
*/
327327

328328

329-
/**
329+
/**
330330
* '\\' is considered a escape for the tags
331331
* Params:
332332
* input = A string with '`' to match, for example description `test` - match the brackets
333-
* startIndex =
334-
* Returns:
333+
* startIndex =
334+
* Returns:
335335
*/
336336
static bool findMatchingEnd(string input, out ptrdiff_t start, out ptrdiff_t end, ptrdiff_t startIndex = 0)
337337
{
@@ -344,7 +344,7 @@ string fixSDLParsingBugs(string sdlData)
344344
case '\\':
345345
i++;
346346
break;
347-
case '`': //The implementation is also
347+
case '`': //The implementation is also
348348
if(start == -1)
349349
start = i;
350350
else
@@ -409,7 +409,7 @@ buildType "unittest" {
409409
dflags "-preview=dip1000"
410410
}
411411
ED";
412-
import hipjson;
412+
import hip.data.json;
413413
SDLNode[] nodes = parseSDL(null, testSdl);
414414
JSONValue v = sdlToJSON(nodes);
415415
assert(!parseJSON(v["description"].toString).hasErrorOccurred);

hipjson/.gitignore

Lines changed: 0 additions & 16 deletions
This file was deleted.

hipjson/dub.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)