Skip to content

Commit

Permalink
0.1.2 - Updated jtext-parser dependency to latest 0.9.0 version (Text…
Browse files Browse the repository at this point in the history
…ParserImpl -> TextIteratorParser)
  • Loading branch information
TeamworkGuy2 committed Sep 12, 2016
1 parent d366c34 commit 39194f7
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ This project does its best to adhere to [Semantic Versioning](http://semver.org/


--------
###[0.1.1](N/A) - 2016-09-02
###[0.1.2](N/A) - 2016-09-11
#### Changed
* Updated jtext-parser dependency to latest 0.9.0 version (TextParserImpl -> TextIteratorParser)


--------
###[0.1.1](https://github.com/TeamworkGuy2/JParseJsonLite/commit/d366c341b32743dc47102f4c1c5b55a0cca79f0e) - 2016-09-02
#### Changed
* Renamed repository from JParserJsonLite -> JParseJsonLite

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
JParseJsonLite
==============
version: 0.1.1
version: 0.1.2

####twg2.parser.jsonLite
for parsing JSON like arrays, numbers, and strings, as well as arrays with none quoted strings.
Expand Down
Binary file modified bin/jparse_json_lite-with-tests.jar
Binary file not shown.
Binary file modified bin/jparse_json_lite.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion package-lib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "0.1.1",
"version" : "0.1.2",
"name" : "jparse-json-lite",
"description" : "Simple parsing for JSON strings/files",
"homepage" : "https://github.com/TeamworkGuy2/JParseJsonLite",
Expand Down
4 changes: 2 additions & 2 deletions src/twg2/parser/jsonLite/JsonLiteArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.ArrayList;
import java.util.List;

import twg2.parser.textParser.TextIteratorParser;
import twg2.parser.textParser.TextParser;
import twg2.parser.textParser.TextParserImpl;
import twg2.parser.textParserUtils.ReadIsMatching;
import twg2.parser.textParserUtils.ReadMatching;
import twg2.parser.textParserUtils.ReadWhitespace;
Expand Down Expand Up @@ -59,7 +59,7 @@ public static final List<String> parseArray(String arrayString) {
* @see JsonLiteArray#parseArray(TextParser, boolean, List)
*/
public static final void parseArray(String arrayString, List<String> dst) {
parseArray(TextParserImpl.of(arrayString), true, dst);
parseArray(TextIteratorParser.of(arrayString), true, dst);
}


Expand Down
11 changes: 6 additions & 5 deletions test/twg2/parser/jsonLite/test/JsonLiteArrayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import org.junit.Test;

import twg2.parser.jsonLite.JsonLiteArray;
import twg2.parser.textParser.TextParserImpl;
import twg2.parser.textParser.TextIteratorParser;
import twg2.parser.textParser.TextParser;
import checks.CheckTask;

/**
Expand Down Expand Up @@ -60,13 +61,13 @@ public void arrayParseTest() {

CheckTask.assertTests(input, expect, (str) -> {
List<String> res = new ArrayList<>();
JsonLiteArray.parseArray(TextParserImpl.of(str, offset, str.length() - offset), true, res);
JsonLiteArray.parseArray(TextIteratorParser.of(str, offset, str.length() - offset), true, res);
return res;
});

CheckTask.assertTests(input, expect, (str) -> {
List<String> res = new ArrayList<>();
TextParserImpl lineBuf = TextParserImpl.of(str);
TextParser lineBuf = TextIteratorParser.of(str);
for(int i = 0; i < offset; i++) { lineBuf.nextChar(); }

JsonLiteArray.parseArray(lineBuf, true, res);
Expand All @@ -85,7 +86,7 @@ public void arrayLineParseTest() {

CheckTask.assertTests(input, expect, null, (str) -> {
List<String> res = new ArrayList<>();
TextParserImpl lineBuf = TextParserImpl.of(str);
TextParser lineBuf = TextIteratorParser.of(str);
for(int i = 0; i < offset; i++) { lineBuf.nextChar(); }

JsonLiteArray.parseArrayLine(lineBuf, true, res);
Expand Down Expand Up @@ -117,7 +118,7 @@ public void readJsonLiteArrayTest() {

for(int i = 0, size = strs.length; i < size; i++) {
List<Object> elems = new ArrayList<>();
JsonLiteArray.parseArrayDeep(TextParserImpl.of(strs[i]), true, elems);
JsonLiteArray.parseArrayDeep(TextIteratorParser.of(strs[i]), true, elems);
CheckTask.assertTests(expect[i], elems.toArray(new Object[0]), (aryStrs) -> aryStrs);

//System.out.println("parsing JsonLite array '" + strs[i] + "': " + elems.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/twg2/parser/jsonLite/test/JsonLiteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import twg2.parser.jsonLite.JsonLiteNumber;
import twg2.parser.jsonLite.JsonLite.NumberType;
import twg2.parser.textParser.TextParserImpl;
import twg2.parser.textParser.TextIteratorParser;

/**
* @author TeamworkGuy2
Expand All @@ -31,7 +31,7 @@ public void readJsonLiteNumberTest() {
for(int i = 0, size = strs.length; i < size; i++) {
String s = strs[i];
Object expect = expected[i];
JsonLiteNumber num = JsonLiteNumber.readNumber(TextParserImpl.of(s));
JsonLiteNumber num = JsonLiteNumber.readNumber(TextIteratorParser.of(s));
if(num.getNumberType() == NumberType.DOUBLE) {
Assert.assertEquals(num.asDouble(), expect);
}
Expand Down

0 comments on commit 39194f7

Please sign in to comment.