需要将如下JSON字符串作为GoogleSheets API POST请求的消息体。打算使用JsonCpp实现。
{"majorDimension":"ROWS","values":[["Name","Sex","Age","Height","Weight"],["阿尔弗雷德","男","14","69","112.5"],["爱丽丝","女","13","56.5","84"],["芭芭拉","女","13","65.3","98"],["凯露","女","14","62.8","102.5"],["亨利","男","14","63.5","102.5"],["詹姆斯","男","12","57.3","83"],["简","女","12","59.8","84.5"],["雅妮特","女","15","62.5","112.5"],["杰弗瑞","男","13","62.5","84"],["约翰","男","12","59","99.5"],["乔伊斯","女","11","51.3","50.5"],["茱迪","女","14","64.3","90"],["罗伊斯","女","12","56.3","77"],["玛丽","女","15","66.5","112"],["菲利普","男","16","72","150"],["罗伯特","男","12","64.8","128"],["罗纳德","男","15","67","133"],["托马斯","男","11","57.5","85"],["威廉","男","15","66.5","112"]]}
最终代码: