a498636530
V2EX  ›  问与答

Java 后台返回 double 类型 iOS 我用 double 接收 会出现精度丢失

  •  
  •   a498636530 · Aug 24, 2018 · 2519 views
    This topic created in 2845 days ago, the information mentioned may be changed or developed.

    swift 语言 正常我用 Double 接收 double 不会有问题 有时候后台会返回说是 double 类型 但是 有时候是 Decimal 类型 这样我用 double 去转换 就会出现精度丢失

    1 replies    2018-08-25 07:20:03 +08:00
    Edward4074
        1
    Edward4074  
       Aug 25, 2018 via iPhone
    遇到到,后台直接返回 string
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3683 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 10:36 · PVG 18:36 · LAX 03:36 · JFK 06:36
    ♥ Do have faith in what you're doing.