File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
weixin-java-common/src/main/java/me/chanjar/weixin/common/bean Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,23 @@ public void setButtons(List<WxMenuButton> buttons) {
28
28
public String toJson () {
29
29
return WxGsonBuilder .create ().toJson (this );
30
30
}
31
-
31
+
32
+ /**
33
+ * 要用 http://mp.weixin.qq.com/wiki/16/ff9b7b85220e1396ffa16794a9d95adc.html 格式来反序列化
34
+ * 相比 http://mp.weixin.qq.com/wiki/13/43de8269be54a0a6f64413e4dfa94f39.html 的格式,外层多套了一个menu
35
+ * @param json
36
+ * @return
37
+ */
32
38
public static WxMenu fromJson (String json ) {
33
39
return WxGsonBuilder .create ().fromJson (json , WxMenu .class );
34
40
}
35
-
41
+
42
+ /**
43
+ * 要用 http://mp.weixin.qq.com/wiki/16/ff9b7b85220e1396ffa16794a9d95adc.html 格式来反序列化
44
+ * 相比 http://mp.weixin.qq.com/wiki/13/43de8269be54a0a6f64413e4dfa94f39.html 的格式,外层多套了一个menu
45
+ * @param is
46
+ * @return
47
+ */
36
48
public static WxMenu fromJson (InputStream is ) {
37
49
return WxGsonBuilder .create ().fromJson (new InputStreamReader (is ), WxMenu .class );
38
50
}
You can’t perform that action at this time.
0 commit comments