xjtlujoe
V2EX  ›  问与答

retrofit 中的 xml 解析

  •  
  •   xjtlujoe · Oct 16, 2017 · 2442 views
    This topic created in 3180 days ago, the information mentioned may be changed or developed.
    <root>
    	<data>
    		<jsonObj>{"customer":{"id":"20029","custnum":"KHP000020029"}}</jsonObj>
    	</data>
    </root>
    
    

    上面这种格式的返回信息,如何解析呢?用 retrofit2+rxjava2 框架学习中。。。

    1 replies    2017-10-16 11:28:46 +08:00
    xjtlujoe
        1
    xjtlujoe  
    OP
       Oct 16, 2017
    需要得到中间哪个 json 数据,但是用 SimpleXmlConverterFactory 或者 GsonConverterFactory 都不行啊。。这个怎么搞?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3268 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 11:30 · PVG 19:30 · LAX 04:30 · JFK 07:30
    ♥ Do have faith in what you're doing.