All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.binarywang.wx.miniapp.bean.WxMaRunStepInfo Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package cn.binarywang.wx.miniapp.bean;

import java.io.Serializable;
import java.util.List;

import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import lombok.Data;
import me.chanjar.weixin.common.util.json.GsonParser;

/**
 * 微信运动步数信息.
 *
 * @author Binary Wang
 */
@Data
public class WxMaRunStepInfo implements Serializable {

  private static final long serialVersionUID = -7496372171398607044L;

  /**
   * 时间戳,表示数据对应的时间.
   */
  private Long timestamp;

  /**
   * 微信运动步数.
   */
  private Integer step;

  public static List fromJson(String json) {
    JsonObject jsonObject = GsonParser.parse(json);
    return WxMaGsonBuilder.create().fromJson(jsonObject.get("stepInfoList").toString(),
      new TypeToken>() {
      }.getType());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy