本文整理汇总了TypeScript中cerialize.Deserialize函数的典型用法代码示例。如果您正苦于以下问题:TypeScript Deserialize函数的具体用法?TypeScript Deserialize怎么用?TypeScript Deserialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Deserialize函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: callback
this.cryptoService.decrypt(password, encryptedInfo, (err, decrypted) => {
if (err){
return callback(err,null,null);
}
try {
var json = JSON.parse(decrypted);
var walletInfo:PrivateWalletInfo = Deserialize(json, PrivateWalletInfo);
}
catch(err){
return callback('cannot open wallet, make sure your password is correct',null,null)
}
if(walletInfo.seed == null){
return callback('SEED_MISSING', walletInfo, null);
}
else {
var wallet = new PrivateWalletService(walletInfo, password);
return callback(null, walletInfo, wallet);
}
});
开发者ID:bijeebuss,项目名称:icewallet,代码行数:19,代码来源:PrivateWalletService.ts
示例2: callback
this.cryptoService.decrypt(password, encryptedInfo, (err, decrypted) => {
if (err){
return callback(err,null,null);
}
else if (decrypted.startsWith('xpub')){
let error = 'This version of Icewallet is not compatable with your wallet\n';
error += 'Please create a new wallet with your public key\n';
error += decrypted + '\n';
error += 'Then use the "Next Unused Address Indexes" option to update your private wallet';
return callback(error,null,null);
}
try {
var json = JSON.parse(decrypted);
var walletInfo:PublicWalletInfo = Deserialize(json, PublicWalletInfo)
var wallet = new PublicWalletService(walletInfo, password);
}
catch(err){
return callback('Could not create wallet, check your xpub or password',decrypted,null);
}
return callback(null, decrypted, wallet);
});
开发者ID:bijeebuss,项目名称:icewallet,代码行数:21,代码来源:PublicWalletService.ts
示例3: Deserialize
.map((res: Response) => {
const updated = Deserialize(res.json(), User);
return updated;
});
开发者ID:andregs,项目名称:think-before-voting,代码行数:4,代码来源:profile.service.ts
示例4:
public static deserializeArray<T>(ctor: NoParamConstructor<T>, json): Array<T> {
return cerialize.Deserialize(json, ctor);
}
开发者ID:NohSeho,项目名称:oh-my-github-1,代码行数:3,代码来源:serialize.ts
示例5: Deserialize
.map((res: Response) => {
const json = res.json();
const locations: Location[] = Deserialize(json, Location);
return locations;
});
开发者ID:andregs,项目名称:think-before-voting,代码行数:5,代码来源:location.service.ts
示例6: Deserialize
.map((res: Response) => {
const json = res.json();
const users = Deserialize(json, User);
return users;
});
开发者ID:andregs,项目名称:think-before-voting,代码行数:5,代码来源:party.service.ts
注:本文中的cerialize.Deserialize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论