更新记录

1.0.0(2021-06-11) 下载此版本

首次提交


平台兼容性

JsonToModelOnLine

在线地址(点击直接访问👉)https://1json.cn

主要功能

  • 支持语言:Java、PHP、Objective-C、Swift、C#、Vue Data
  • 支持下划线转驼峰或驼峰转下划线
  • 支持添加注释头
  • 支持任意层级的Json数据,自动过滤重复数据

    预览

docway文档复制转vue data演示

使用示例

示例Json数据(来源于聚合数据API文档)

{
    "error_code": 0,
    "success": true,
    "reason": "success",
    "result": {
        "collectCount": "4170000",
        "crawlTime": "2019-01-24 16:43:58",
        "ranks": [
            {
                "rankStr": "1-1",
                "title": "聚合工具 - 聚合数据",
                "url": "http:\/\/tool.chinaz.com\/",
                "xiongzhangId": "聚合数据"
            },
            {
                "rankStr": "1-2",
                "title": "聚合素材-分享综合设计素材的平台",
                "url": "http:\/\/sc.chinaz.com\/",
                "xiongzhangId": ""
            }
        ]
    }
}

转Java模型类

----- 共3条Model数据 -----
private String collectCount;
private String crawlTime;
private Object[] ranks;
----------------------------
private String rankStr;
private String title;
private String url;
private String xiongzhangId;
----------------------------
private int error_code;
private boolean success;
private String reason;
private Object result;
----------------------------
  • 驼峰转下划线
    ----- 共3条Model数据 -----
    private String collect_count;
    private String crawl_time;
    private Object[] ranks;
    ----------------------------
    private String rank_str;
    private String title;
    private String url;
    private String xiongzhang_id;
    ----------------------------
    private int error_code;
    private boolean success;
    private String reason;
    private Object result;
    ----------------------------

    转PHP模型类

    ----- 共3条Model数据 -----
    public $collectCount;
    public $crawlTime;
    public $ranks;
    ----------------------------
    public $rankStr;
    public $title;
    public $url;
    public $xiongzhangId;
    ----------------------------
    public $error_code;
    public $success;
    public $reason;
    public $result;
    ----------------------------

转Objective-C模型类

----- 共3条Model数据 -----
@property (copy, nonatomic) NSString *collectCount;
@property (copy, nonatomic) NSString *crawlTime;
@property (strong, nonatomic) NSArray *ranks;
----------------------------
@property (copy, nonatomic) NSString *rankStr;
@property (copy, nonatomic) NSString *title;
@property (copy, nonatomic) NSString *url;
@property (copy, nonatomic) NSString *xiongzhangId;
----------------------------
@property (assign, nonatomic) int error_code;
@property (assign, nonatomic) BOOL success;
@property (copy, nonatomic) NSString *reason;
@property (strong, nonatomic) id result;
----------------------------

转Swift模型类

----- 共3条Model数据 -----
var collectCount :String?
var crawlTime :String?
var ranks :Array?
----------------------------
var rankStr :String?
var title :String?
var url :String?
var xiongzhangId :String?
----------------------------
var error_code :Int?
var success :Bool?
var reason :String?
var result :any?
----------------------------

转C#模型类

----- 共3条Model数据 -----
public string collectCount { get; set;};
public string crawlTime { get; set;};
public List <Object> ranks { get; set;};
----------------------------
public string rankStr { get; set;};
public string title { get; set;};
public string url { get; set;};
public string xiongzhangId { get; set;};
----------------------------
public int error_code { get; set;};
public boolean success { get; set;};
public string reason { get; set;};
public Object result { get; set;};
----------------------------

转Vue data

----- 共3条Model数据 -----
collectCount: '',
crawlTime: '',
ranks: []
----------------------------
rankStr: '',
title: '',
url: '',
xiongzhangId: ''
----------------------------
error_code: 0,
success: false,
reason: '',
result: null
----------------------------

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问