小编San*_*eev的帖子

如何在Java中解析JSON

我有以下JSON文本.如何可以解析它来获得pageName,pagePic,post_id,等?

{
   "pageInfo": {
         "pageName": "abc",
         "pagePic": "http://example.com/content.jpg"
    },
    "posts": [
         {
              "post_id": "123456789012_123456789012",
              "actor_id": "1234567890",
              "picOfPersonWhoPosted": "http://example.com/photo.jpg",
              "nameOfPersonWhoPosted": "Jane Doe",
              "message": "Sounds cool. Can't wait to see it!",
              "likesCount": "2",
              "comments": [],
              "timeOfPost": "1234567890"
         }
    ]
}
Run Code Online (Sandbox Code Playgroud)

java parsing json

971
推荐指数
26
解决办法
154万
查看次数

ng2智能表复选框在所有页面上都不是持久的

我是ng2-smart-tables的新手.我正在尝试从GitHub页面修改下面的示例,以便在从一个页面移动到另一个页面时复选框不会消失.

import { Component } from '@angular/core';

@Component({
  selector: 'basic-example-multi-select',
  template: `
    <ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table>
  `,
})
export class BasicExampleMultiSelectComponent {

  settings = {
    selectMode: 'multi',
    columns: {
      id: {
        title: 'ID',
      },
      name: {
        title: 'Full Name',
      },
      username: {
        title: 'User Name',
      },
      email: {
        title: 'Email',
      },
    },
  };

  data = [
    {
      id: 1,
      name: 'Leanne Graham',
      username: 'Bret',
      email: 'Sincere@april.biz',
    },
    {
      id: 2,
      name: 'Ervin Howell',
      username: 'Antonette',
      email: 'Shanna@melissa.tv',
    },
    {
      id: 3, …
Run Code Online (Sandbox Code Playgroud)

javascript checkboxlist ng2-smart-table angular

13
推荐指数
1
解决办法
2410
查看次数