sed - How do I match this pattern?
I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
I want to use sed to successfully remove everything up until the {
on the first line of each block leaving me with a data format similar to
{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},
sed
add a comment |
I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
I want to use sed to successfully remove everything up until the {
on the first line of each block leaving me with a data format similar to
{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},
sed
1
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12
add a comment |
I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
I want to use sed to successfully remove everything up until the {
on the first line of each block leaving me with a data format similar to
{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},
sed
I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
I want to use sed to successfully remove everything up until the {
on the first line of each block leaving me with a data format similar to
{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},
sed
sed
edited 1 hour ago
Rui F Ribeiro
39.2k1479130
39.2k1479130
asked Oct 20 '15 at 7:02
CMS
1
1
1
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12
add a comment |
1
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12
1
1
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12
add a comment |
3 Answers
3
active
oldest
votes
This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON
. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed
answers.
Please - don't use a regex to parse JSON
. It's nasty. regex is bad at recursive tagged data types like JSON
/XML
. It's at best a dirty hack which creates brittle code in future.
Similarly - JSON
is important that it be complete - I've had to guess how your full JSON
looks.
Assuming JSON
like this (used http://jsonlint.com/ to tidy up the elements)
{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}
Then the way to just get the bits you want:
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $input = ### as above, snipped for brevity.
#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );
And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).
add a comment |
Simple with sed
:
sed 's/^[^{]*{/{/' file
- Just searches for lines starting with characters which are not
{
(^[^{]
), zero or more times*
followed by a{
. - This all is replaced by a single
{
.
Edit: If you want to exclude some patterns from being replace (for example the "ipset":
line) use this:
sed '/"ipset":/n;s/^[^{]*{/{/' file
- If the line starts with
"ipset":
, continue with the next linen
.
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:s220823vaps2513
?s-digit-vaps-digit
or so?
– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
|
show 5 more comments
This seems to work, at least on the sample of data you provided:
sed -'s/^ .*{/{/' file
It transforms the first line of each block "name" {
(note the leading space) to just {
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f237329%2fsed-how-do-i-match-this-pattern%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON
. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed
answers.
Please - don't use a regex to parse JSON
. It's nasty. regex is bad at recursive tagged data types like JSON
/XML
. It's at best a dirty hack which creates brittle code in future.
Similarly - JSON
is important that it be complete - I've had to guess how your full JSON
looks.
Assuming JSON
like this (used http://jsonlint.com/ to tidy up the elements)
{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}
Then the way to just get the bits you want:
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $input = ### as above, snipped for brevity.
#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );
And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).
add a comment |
This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON
. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed
answers.
Please - don't use a regex to parse JSON
. It's nasty. regex is bad at recursive tagged data types like JSON
/XML
. It's at best a dirty hack which creates brittle code in future.
Similarly - JSON
is important that it be complete - I've had to guess how your full JSON
looks.
Assuming JSON
like this (used http://jsonlint.com/ to tidy up the elements)
{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}
Then the way to just get the bits you want:
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $input = ### as above, snipped for brevity.
#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );
And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).
add a comment |
This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON
. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed
answers.
Please - don't use a regex to parse JSON
. It's nasty. regex is bad at recursive tagged data types like JSON
/XML
. It's at best a dirty hack which creates brittle code in future.
Similarly - JSON
is important that it be complete - I've had to guess how your full JSON
looks.
Assuming JSON
like this (used http://jsonlint.com/ to tidy up the elements)
{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}
Then the way to just get the bits you want:
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $input = ### as above, snipped for brevity.
#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );
And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).
This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON
. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed
answers.
Please - don't use a regex to parse JSON
. It's nasty. regex is bad at recursive tagged data types like JSON
/XML
. It's at best a dirty hack which creates brittle code in future.
Similarly - JSON
is important that it be complete - I've had to guess how your full JSON
looks.
Assuming JSON
like this (used http://jsonlint.com/ to tidy up the elements)
{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}
Then the way to just get the bits you want:
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $input = ### as above, snipped for brevity.
#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );
And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).
answered Oct 20 '15 at 9:40
Sobrique
3,789518
3,789518
add a comment |
add a comment |
Simple with sed
:
sed 's/^[^{]*{/{/' file
- Just searches for lines starting with characters which are not
{
(^[^{]
), zero or more times*
followed by a{
. - This all is replaced by a single
{
.
Edit: If you want to exclude some patterns from being replace (for example the "ipset":
line) use this:
sed '/"ipset":/n;s/^[^{]*{/{/' file
- If the line starts with
"ipset":
, continue with the next linen
.
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:s220823vaps2513
?s-digit-vaps-digit
or so?
– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
|
show 5 more comments
Simple with sed
:
sed 's/^[^{]*{/{/' file
- Just searches for lines starting with characters which are not
{
(^[^{]
), zero or more times*
followed by a{
. - This all is replaced by a single
{
.
Edit: If you want to exclude some patterns from being replace (for example the "ipset":
line) use this:
sed '/"ipset":/n;s/^[^{]*{/{/' file
- If the line starts with
"ipset":
, continue with the next linen
.
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:s220823vaps2513
?s-digit-vaps-digit
or so?
– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
|
show 5 more comments
Simple with sed
:
sed 's/^[^{]*{/{/' file
- Just searches for lines starting with characters which are not
{
(^[^{]
), zero or more times*
followed by a{
. - This all is replaced by a single
{
.
Edit: If you want to exclude some patterns from being replace (for example the "ipset":
line) use this:
sed '/"ipset":/n;s/^[^{]*{/{/' file
- If the line starts with
"ipset":
, continue with the next linen
.
Simple with sed
:
sed 's/^[^{]*{/{/' file
- Just searches for lines starting with characters which are not
{
(^[^{]
), zero or more times*
followed by a{
. - This all is replaced by a single
{
.
Edit: If you want to exclude some patterns from being replace (for example the "ipset":
line) use this:
sed '/"ipset":/n;s/^[^{]*{/{/' file
- If the line starts with
"ipset":
, continue with the next linen
.
edited Oct 20 '15 at 7:39
answered Oct 20 '15 at 7:07
chaos
35.1k773116
35.1k773116
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:s220823vaps2513
?s-digit-vaps-digit
or so?
– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
|
show 5 more comments
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:s220823vaps2513
?s-digit-vaps-digit
or so?
– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Will this not effect the ipset data?
– CMS
Oct 20 '15 at 7:10
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:
s220823vaps2513
? s-digit-vaps-digit
or so?– chaos
Oct 20 '15 at 7:15
Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names:
s220823vaps2513
? s-digit-vaps-digit
or so?– chaos
Oct 20 '15 at 7:15
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Yes the names are similar in each line, probably around 10 variants though
– CMS
Oct 20 '15 at 7:17
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
– CMS
Oct 20 '15 at 7:18
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
Yes, see my edited answer.
– chaos
Oct 20 '15 at 7:23
|
show 5 more comments
This seems to work, at least on the sample of data you provided:
sed -'s/^ .*{/{/' file
It transforms the first line of each block "name" {
(note the leading space) to just {
add a comment |
This seems to work, at least on the sample of data you provided:
sed -'s/^ .*{/{/' file
It transforms the first line of each block "name" {
(note the leading space) to just {
add a comment |
This seems to work, at least on the sample of data you provided:
sed -'s/^ .*{/{/' file
It transforms the first line of each block "name" {
(note the leading space) to just {
This seems to work, at least on the sample of data you provided:
sed -'s/^ .*{/{/' file
It transforms the first line of each block "name" {
(note the leading space) to just {
edited Oct 20 '15 at 7:43
answered Oct 20 '15 at 7:24
cas
38.7k452100
38.7k452100
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f237329%2fsed-how-do-i-match-this-pattern%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12