com.ruijc.fastjson.JSONP Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-fastjson Show documentation
Show all versions of spring-boot-starter-fastjson Show documentation
Springboot自动化配置Fastjson框架并支持JSONP操作。
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ruijc.fastjson;
/**
* Fastjson的JSONP消息对象
*
* @author Storezhang
*/
public class JSONP {
private String function;//JSONP回调方法
private Object json;//真正的Json对象
public JSONP(String function, Object json) {
this.function = function;
this.json = json;
}
public static JSONP create(String callback, Object data) {
return new JSONP(callback, data);
}
public String getFunction() {
return function;
}
public void setFunction(String function) {
this.function = function;
}
public Object getJson() {
return json;
}
public void setJson(Object json) {
this.json = json;
}
}