Closed claudiobadii closed 8 years ago
Thanks for noticing! Could you just explain why you're using string concatenation rather than using JsonHelper.Serialize(appInfo);
?
In the first attempt I tried with the line of code that you suggest but the plugin did not work. So to publish the app faster as possible I use string concatenation. In the next weeks if you want I will try again to insert the line of code using the Serialize method.
Claudio
2016-02-05 22:04 GMT+01:00 Dan Michael O. Heggø notifications@github.com:
Thanks for noticing! Could you just explain why you're using string concatenation rather than using JsonHelper.Serialize(appInfo); ?
— Reply to this email directly or view it on GitHub https://github.com/danmichaelo/cordova-plugin-appinfo/pull/8#issuecomment-180553573 .
Ok, would be great if you can give it another try. If it doesn't work I can just merge as it is.
(I don't have a windows phone environment available myself.)
So, I try it again. With the command
JsonHelper.Serialize(appInfo);
and the returned JSON is:
[{"Key": "identifier", "Value": "{00000000-0000-0000-0000-000000000000}"}, {"Key": "version", "Value": "1.0.0"}, {"Key": "build", "Value": ""}]
Obviously a real identifier has the same structure but different number: 000...000 is only an example of the structure. With this structure is very expensive getting a value, instead of simply write AppInfo.version. There is another solution: create a class as indicated in:
but for my scope I think that in my version I use the code pulled in this branch. Sorry for my poor english.
Claudio
Ok, I get that. Merging as-is. Thanks for looking into it!
In the previous version there is not "using System.Collections.Generic;" useful to use Dictionary. At JsonHelper.Serialize(keys) the variable "keys" is not defined, so I change directly the value passed as jsonString.
This work on WP 8.1