List<Merchandise__c> merchandise = [select Id,Name,Price__c,Quantity__c from Merchandise__c limit 1];
String goodsToJson = JSON.serialize(merchandise);//通过serialize方法序列化成JSON内容
String goodsToJsonPretty = JSON.serializePretty(merchandise);//通过serializePretty方法序列化成JSON内容,以精美的输出格式输出
System.debug(goodsToJson);
System.debug(goodsToJsonPretty);

70、saleforce的Json输出

 

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2021-09-21
  • 2021-10-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
相关资源
相似解决方案