亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么在反序列化為字典時 JsonConvert 會拋出異常

為什么在反序列化為字典時 JsonConvert 會拋出異常

C#
米琪卡哇伊 2021-10-24 17:42:53
對我有用的解決方案:    foreach (var option in options)    {        RadioButton rb = new RadioButton(Context);        rb.SetButtonDrawable(null);        rb.SetCompoundDrawablesWithIntrinsicBounds(null,null,null,ContextCompat.GetDrawable(Context, Android.Resource.Drawable.ButtonRadio));        rb.Text = option.Text;        rb.Gravity = GravityFlags.Center;        radioGroup.AddView(rb);    }    // Weight für die RBs setzen    for (int i = 0; i < radioGroup.ChildCount; i++)    {        var currentRb = radioGroup.GetChildAt(i);        LinearLayout.LayoutParams rbParams = new LinearLayout.LayoutParams(0,            ViewGroup.LayoutParams.WrapContent) {Weight = 1};        currentRb.LayoutParameters = rbParams;    }.axml 中的簡化 RadioGroup:    <LinearLayout    android:layout_marginLeft="5dp"    android:layout_marginRight="5dp"    android:gravity="center"    android:layout_width="match_parent"    android:id="@+id/formItemScaleLayout"    android:layout_height="wrap_content"    android:orientation="horizontal">        <TextView            android:id="@+id/formItemScaleStart"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="Start"/>        <RadioGroup            android:layout_weight="1"            android:id="@+id/formItemScaleRadioGroup"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:orientation="horizontal" >        </RadioGroup>        <TextView            android:id="@+id/formItemScaleEnd"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="End"/></LinearLayout>
查看完整描述

1 回答

?
夢里花落0921

TA貢獻1772條經驗 獲得超6個贊

您的第二個示例不是有效的 JSON?;叵胍幌拢琂SON 基于 JavaScript,在該語言中,任何以 0 開頭的數字文字都被解釋為八進制數。有效的八進制數字是 0-7,因此如果文字包含 8 或 9,則無法解析它并會引發錯誤。('010203' 有效,因為它是一個有效的八進制文字,但 '070809' 不是)


查看完整回答
反對 回復 2021-10-24
  • 1 回答
  • 0 關注
  • 270 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號