How to sent windows key for google cloud platform as an JSON?











up vote
0
down vote

favorite












I need to attach the encoded key to the modulus in for windows set metadata rest call to get a user validated for login.



So the format which google expects is:



{
"fingerprint": string,
"items": [
{
"key": string,
"value": string
}
],
"kind": string
}


So when you are sending data to google they want in this format.



{
"fingerprint": "sfasdfasdfFSN7AuU=",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}
]
}


It will also accept if I send the same JSON in this below format but will not perform any action in there:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value":
{
"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019"04-14T01:37:19Z"
}
}
]
}


Does any one knows a solution for this or faced this issue?
Google Doc link










share|improve this question
























  • Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
    – John Hanley
    2 days ago















up vote
0
down vote

favorite












I need to attach the encoded key to the modulus in for windows set metadata rest call to get a user validated for login.



So the format which google expects is:



{
"fingerprint": string,
"items": [
{
"key": string,
"value": string
}
],
"kind": string
}


So when you are sending data to google they want in this format.



{
"fingerprint": "sfasdfasdfFSN7AuU=",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}
]
}


It will also accept if I send the same JSON in this below format but will not perform any action in there:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value":
{
"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019"04-14T01:37:19Z"
}
}
]
}


Does any one knows a solution for this or faced this issue?
Google Doc link










share|improve this question
























  • Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
    – John Hanley
    2 days ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to attach the encoded key to the modulus in for windows set metadata rest call to get a user validated for login.



So the format which google expects is:



{
"fingerprint": string,
"items": [
{
"key": string,
"value": string
}
],
"kind": string
}


So when you are sending data to google they want in this format.



{
"fingerprint": "sfasdfasdfFSN7AuU=",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}
]
}


It will also accept if I send the same JSON in this below format but will not perform any action in there:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value":
{
"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019"04-14T01:37:19Z"
}
}
]
}


Does any one knows a solution for this or faced this issue?
Google Doc link










share|improve this question















I need to attach the encoded key to the modulus in for windows set metadata rest call to get a user validated for login.



So the format which google expects is:



{
"fingerprint": string,
"items": [
{
"key": string,
"value": string
}
],
"kind": string
}


So when you are sending data to google they want in this format.



{
"fingerprint": "sfasdfasdfFSN7AuU=",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}
]
}


It will also accept if I send the same JSON in this below format but will not perform any action in there:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value":
{
"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019"04-14T01:37:19Z"
}
}
]
}


Does any one knows a solution for this or faced this issue?
Google Doc link







javascript json google-cloud-platform






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Alan Dávalos

1,259516




1,259516










asked 2 days ago









Mag

1




1












  • Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
    – John Hanley
    2 days ago


















  • Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
    – John Hanley
    2 days ago
















Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
– John Hanley
2 days ago




Please edit your question and remove the pictures and replace with the actual text. Your style prevents people searching for questions like yours from finding any information. Also in time these picture links may become invalid redering your question useless.
– John Hanley
2 days ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













In the format definition you're providing, it mentions that the value property of every item in the items array should be a string, and if you look closely, the "correct" example you provide sets value as a string`



  {
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}


However, in your second example, you're setting value as an object, so it's not in the expected format, the correct version should look something like this:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019-04-14T01:37:19Z"
}"
}
]
}


That should make it at least accept your request, you might need to fill the email with a correct one and check out whether if it's "expireOn" or "expiresOn" as your examples use both






share|improve this answer





















  • Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
    – Mag
    yesterday













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343143%2fhow-to-sent-windows-key-for-google-cloud-platform-as-an-json%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













In the format definition you're providing, it mentions that the value property of every item in the items array should be a string, and if you look closely, the "correct" example you provide sets value as a string`



  {
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}


However, in your second example, you're setting value as an object, so it's not in the expected format, the correct version should look something like this:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019-04-14T01:37:19Z"
}"
}
]
}


That should make it at least accept your request, you might need to fill the email with a correct one and check out whether if it's "expireOn" or "expiresOn" as your examples use both






share|improve this answer





















  • Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
    – Mag
    yesterday

















up vote
0
down vote













In the format definition you're providing, it mentions that the value property of every item in the items array should be a string, and if you look closely, the "correct" example you provide sets value as a string`



  {
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}


However, in your second example, you're setting value as an object, so it's not in the expected format, the correct version should look something like this:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019-04-14T01:37:19Z"
}"
}
]
}


That should make it at least accept your request, you might need to fill the email with a correct one and check out whether if it's "expireOn" or "expiresOn" as your examples use both






share|improve this answer





















  • Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
    – Mag
    yesterday















up vote
0
down vote










up vote
0
down vote









In the format definition you're providing, it mentions that the value property of every item in the items array should be a string, and if you look closely, the "correct" example you provide sets value as a string`



  {
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}


However, in your second example, you're setting value as an object, so it's not in the expected format, the correct version should look something like this:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019-04-14T01:37:19Z"
}"
}
]
}


That should make it at least accept your request, you might need to fill the email with a correct one and check out whether if it's "expireOn" or "expiresOn" as your examples use both






share|improve this answer












In the format definition you're providing, it mentions that the value property of every item in the items array should be a string, and if you look closely, the "correct" example you provide sets value as a string`



  {
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "somekey",
"exponent": "AQAB",
"email": "samleemail",
"expireOn": "2019-04-14T01:37:19Z"
}"
}


However, in your second example, you're setting value as an object, so it's not in the expected format, the correct version should look something like this:



{
"fingerprint": "asfasd",
"items": [
{
"key": "windows-keys",
"value": "{"userName": "user",
"modulus": "IEFBQUFCM056YUMxeWM",
"exponent": "AQAB",
"email": "somemailt",
"expiresOn": "2019-04-14T01:37:19Z"
}"
}
]
}


That should make it at least accept your request, you might need to fill the email with a correct one and check out whether if it's "expireOn" or "expiresOn" as your examples use both







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Alan Dávalos

1,259516




1,259516












  • Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
    – Mag
    yesterday




















  • Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
    – Mag
    yesterday


















Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
– Mag
yesterday






Thanks for the response, if you put those extra "" in the code the whole otbjec gets messed up. The issue is when you start putting those "" it will require / inside all value pair to make it correct, which is basically makes it as a wrong json. And yes it's "expireOn" thanks for that.
– Mag
yesterday




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343143%2fhow-to-sent-windows-key-for-google-cloud-platform-as-an-json%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

RAC Tourist Trophy