Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support ignoring elements/properties during deserialization
Signed-off-by: Paul Horton <paul.horton@owasp.org>
- Loading branch information
Showing
7 changed files
with
153 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/fixtures/the-phoenix-project-camel-case-with-ignored.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"something_to_be_ignored": "some_value", | ||
"title": "The Phoenix Project", | ||
"isbnNumber": "978-1942788294", | ||
"edition": { | ||
"number": 5, | ||
"name": "5th Anniversary Limited Edition" | ||
}, | ||
"publishDate": "2018-04-16", | ||
"type": "fiction", | ||
"authors": [ | ||
"Kevin Behr", | ||
"Gene Kim", | ||
"George Spafford" | ||
], | ||
"publisher": { | ||
"name": "IT Revolution Press LLC" | ||
}, | ||
"chapters": [ | ||
{ | ||
"number": 1, | ||
"title": "Tuesday, September 2" | ||
}, | ||
{ | ||
"number": 2, | ||
"title": "Tuesday, September 2" | ||
}, | ||
{ | ||
"number": 3, | ||
"title": "Tuesday, September 2" | ||
}, | ||
{ | ||
"number": 4, | ||
"title": "Wednesday, September 3" | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
tests/fixtures/the-phoenix-project-camel-case-with-ignored.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<book isbnNumber="978-1942788294" ignoreMe="something"> | ||
<ignored>thing</ignored> | ||
<title>The Phoenix Project</title> | ||
<edition number="5">5th Anniversary Limited Edition</edition> | ||
<publishDate>2018-04-16</publishDate> | ||
<author>Kevin Behr</author> | ||
<author>Gene Kim</author> | ||
<author>George Spafford</author> | ||
<type>fiction</type> | ||
<publisher> | ||
<name>IT Revolution Press LLC</name> | ||
</publisher> | ||
<chapters> | ||
<chapter> | ||
<number>1</number> | ||
<title>Tuesday, September 2</title> | ||
</chapter> | ||
<chapter> | ||
<number>2</number> | ||
<title>Tuesday, September 2</title> | ||
</chapter> | ||
<chapter> | ||
<number>3</number> | ||
<title>Tuesday, September 2</title> | ||
</chapter> | ||
<chapter> | ||
<number>4</number> | ||
<title>Wednesday, September 3</title> | ||
</chapter> | ||
</chapters> | ||
</book> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters