I have a very large JSON file with almost 30000 records.
One record looks something like this:
{
"adlibJSON": {
"recordList": {
"record": [
{
"@attributes": {
"priref": "4372",
"created": "2011-12-09T23:09:57",
"modification": "2012-08-11T17:07:51",
"selected": "False"
},
"acquisition.date": [
"1954"
],
"documentation.title": [
"A lot of text with a lot of extra double quotes like "this" and "this""
] ... ...
The problem is that there are a lot of values with extra double quotes in it. This can be 1 double quote, but also 2 or 3 extra double quotes. See the value of "documentation.title" in my example.
How do i find all these quotes and replace them with regular expression.
I use sublime text 2 to do my regular expression, but i don’t know how to solve this specific problem.
Here are two examples:
These have the following requirements:
Otherwise you have to improve it. The second one even allows values to start with a whitespace, but may also have some other side-effects …
Example 1:
Example 2: