Dynamic JSON remapping
up vote
0
down vote
favorite
I need to make my JSON API output editable dynamically through mapping some values in it to new keys (dynamically)
for example:
API Output:
{
"ABC": {
"a": "Key1",
"b": [
1,
2,
3
],
"c": {
"c1": 4,
"c2": 5
}
}
}
output willing to have:
{
"e":"key1,chooses ABC.a",
"f":"1 chooses ABC.b[0]",
"g":"4 chooses ABC.c.c1"
}
NB: e,f, and g are key the I predefined already for this mapping purpose.
I tried scooping JOLT and similar tools but they didn't fit.
java json dynamic-controls
add a comment |
up vote
0
down vote
favorite
I need to make my JSON API output editable dynamically through mapping some values in it to new keys (dynamically)
for example:
API Output:
{
"ABC": {
"a": "Key1",
"b": [
1,
2,
3
],
"c": {
"c1": 4,
"c2": 5
}
}
}
output willing to have:
{
"e":"key1,chooses ABC.a",
"f":"1 chooses ABC.b[0]",
"g":"4 chooses ABC.c.c1"
}
NB: e,f, and g are key the I predefined already for this mapping purpose.
I tried scooping JOLT and similar tools but they didn't fit.
java json dynamic-controls
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to make my JSON API output editable dynamically through mapping some values in it to new keys (dynamically)
for example:
API Output:
{
"ABC": {
"a": "Key1",
"b": [
1,
2,
3
],
"c": {
"c1": 4,
"c2": 5
}
}
}
output willing to have:
{
"e":"key1,chooses ABC.a",
"f":"1 chooses ABC.b[0]",
"g":"4 chooses ABC.c.c1"
}
NB: e,f, and g are key the I predefined already for this mapping purpose.
I tried scooping JOLT and similar tools but they didn't fit.
java json dynamic-controls
I need to make my JSON API output editable dynamically through mapping some values in it to new keys (dynamically)
for example:
API Output:
{
"ABC": {
"a": "Key1",
"b": [
1,
2,
3
],
"c": {
"c1": 4,
"c2": 5
}
}
}
output willing to have:
{
"e":"key1,chooses ABC.a",
"f":"1 chooses ABC.b[0]",
"g":"4 chooses ABC.c.c1"
}
NB: e,f, and g are key the I predefined already for this mapping purpose.
I tried scooping JOLT and similar tools but they didn't fit.
java json dynamic-controls
java json dynamic-controls
edited Nov 19 at 13:24
Nesku
18919
18919
asked Nov 19 at 12:55
fadel
1
1
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22
add a comment |
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2fstackoverflow.com%2fquestions%2f53375125%2fdynamic-json-remapping%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
Can you please provide at least an attempt of your solution? Are a b c always formatted like this?
– Thecave3
Nov 19 at 13:12
a,b, and c are dummy unknown keys returned from the API, what I care about is the value of those keys, not the keys. check output willing to have section in my question for the example
– fadel
Nov 19 at 13:19
what I need to have is the ability to refactor the json the way i want dynamically
– fadel
Nov 19 at 13:22