本文整理匯總了Golang中github.com/pomack/jsonhelper/go/jsonhelper.JSONObject.GetAsInt64方法的典型用法代碼示例。如果您正苦於以下問題:Golang JSONObject.GetAsInt64方法的具體用法?Golang JSONObject.GetAsInt64怎麽用?Golang JSONObject.GetAsInt64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/pomack/jsonhelper/go/jsonhelper.JSONObject
的用法示例。
在下文中一共展示了JSONObject.GetAsInt64方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: FromJSON
func (p *smugMugUserInfoResult) FromJSON(props jsonhelper.JSONObject) {
LogDebug("user info result from json: ", props)
p.id = props.GetAsInt64("id")
p.accountStatus = props.GetAsString("AccountStatus")
p.accountType = props.GetAsString("AccountType")
p.fileSizeLimit = props.GetAsInt64("FileSizeLimit")
p.name = props.GetAsString("Name")
p.nickname = props.GetAsString("NickName")
p.smugVault = props.GetAsBool("SmugVault")
p.url = props.GetAsString("URL")
}
示例2: InitFromJSONObject
func (p *Consumer) InitFromJSONObject(obj jsonhelper.JSONObject) {
p.PersistableModel.InitFromJSONObject(obj)
p.DomainName = obj.GetAsString("domain_name")
p.HomePage = obj.GetAsString("home_page")
p.AuthorizationPage = obj.GetAsString("authorization_page")
p.ShortName = obj.GetAsString("short_name")
p.Name = obj.GetAsString("name")
p.Email = obj.GetAsString("email")
p.PhoneNumber = obj.GetAsString("phone_number")
p.IsTrusted = obj.GetAsBool("is_trusted")
p.IsSuggested = obj.GetAsBool("is_suggested")
p.AllowLogin = obj.GetAsBool("allow_login")
p.DisableLoginAt = obj.GetAsInt64("disable_login_at")
}
示例3: InitFromJSONObject
func (p *PersistableModel) InitFromJSONObject(obj jsonhelper.JSONObject) {
p.Id = obj.GetAsString("id")
p.Etag = obj.GetAsString("etag")
p.CreatedAt = obj.GetAsInt64("created_at")
p.ModifiedAt = obj.GetAsInt64("modified_at")
}