Below are some of the test's that I wrote to show the issue that I'm seeing with the library. Please let me know if anyone else is seeing the issues. Looking into the library, the issues seem to be related to fix #83 on the GRMustache library. Please let me know if you think this is an issue and if I could help.
When there are Int types along with Strings in the value dictionary, the whole dictionary gets replaced in the place where a value for a key should be replaced in mustache. Below are some tests that I wrote to explain what's wrong.
XCTAssertEqual failed: ("Optional(" column--[AnyHashable("position"): Optional(1), AnyHashable("css"): Optional("string"), AnyHashable("style"): Optional(true)]")") is not equal to ("Optional("column--1")”)
Comments: As we can see, mustache should have returned column—1, but it replaces position with the whole dictionary. However, this never happens if they are all strings, as we can see in the below example. Also, this happens even if the position was a regular Int.I’m using Int64 because for some reason that’s what the apple SDK converts the values from the JSON to, maybe just to accommodate huge numbers.
Below are some of the test's that I wrote to show the issue that I'm seeing with the library. Please let me know if anyone else is seeing the issues. Looking into the library, the issues seem to be related to fix #83 on the GRMustache library. Please let me know if you think this is an issue and if I could help.
When there are Int types along with Strings in the value dictionary, the whole dictionary gets replaced in the place where a value for a key should be replaced in mustache. Below are some tests that I wrote to explain what's wrong.
This fails with the below error:
XCTAssertEqual failed: ("Optional(" column--[AnyHashable("position"): Optional(1), AnyHashable("css"): Optional("string"), AnyHashable("style"): Optional(true)]")") is not equal to ("Optional("column--1")”)
Comments: As we can see, mustache should have returned column—1, but it replaces position with the whole dictionary. However, this never happens if they are all strings, as we can see in the below example. Also, this happens even if the position was a regular Int.I’m using Int64 because for some reason that’s what the apple SDK converts the values from the JSON to, maybe just to accommodate huge numbers.
The above test passes since position here is a string.
However, if position is an Array of Int64 or Int for that matter, it works as it should. The above test does pass.
Pardon my force unwraps, just trying to show issue that I'm facing.