首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏函数式编程语言及工具

    Akka(34): Http:Unmarshalling,from Json

      Unmarshalling是Akka-http内把网上可传输格式的数据转变成程序高级结构话数据的过程,比如把Json数据转换成某个自定义类型的实例。 Unmarshalling对一个A类实例到B类实例的转换是通过Unmarshaller[A,B]来实现的: trait Unmarshaller[-A, B] extends akka.http.javadsl.unmarshalling.Unmarshaller import akka.http.scaladsl.model._ import akka.http.scaladsl.server.Directives._ object Unmarshalling Unmarshalling可以直接进行Json到自定义类型之间的转换,如: val route = (path("User") & post) { entity(as[User]){ user => 下面就是本次讨论的示范源代码: Unmarshalling import akka.actor._ import akka.stream._ import akka.http.scaladsl.unmarshalling.Unmarshal

    1K70发布于 2018-01-05
  • Parcelable使用时java.lang.RuntimeException: Parcel android.os.Parcel@xxxx: Unmarshalling unknown typ...

    一旦写入和读取的字段数量或顺序不匹配,就会导致: 后续字段读取错位(例如把 int 当作 long 读取) 抛出 Parcel android.os.Parcel@4265a958: Unmarshalling

    18510编辑于 2025-11-30
  • 来自专栏函数式编程语言及工具

    Akka(37): Http:客户端操作模式

    case Success(t) => println(s"Got response entity: ${t}") case Failure(e) => println(s"Unmarshalling case Success(t) => println(s"Got response entity: ${t}") case Failure(e) => println(s"Unmarshalling import akka.http.scaladsl.unmarshalling._ import akka.http.scaladsl.marshalling.Marshal import scala.collection.SortedMap case Success(t) => println(s"Got response entity: ${t}") case Failure(e) => println(s"Unmarshalling case Success(t) => println(s"Got response entity: ${t}") case Failure(e) => println(s"Unmarshalling

    1.4K81发布于 2018-01-05
  • 来自专栏函数式编程语言及工具

    Akka(43): Http:SSE-Server Sent Event - 服务端主推消息

    } } } } } 客户端订阅SSE的方式如下: import akka.http.scaladsl.unmarshalling.sse.EventStreamUnmarshalling akka.http.scaladsl.client.RequestBuilding.Get import akka.http.scaladsl.model.HttpMethods import akka.http.scaladsl.unmarshalling.Unmarshal system = ActorSystem() implicit val mat = ActorMaterializer() import akka.http.scaladsl.unmarshalling.sse.EventStreamUnmarshalling

    1.3K90发布于 2018-01-05
  • 来自专栏网络安全攻防

    JAVA安全之RMI命令执行深度刨析

    catch (ClassNotFoundException var95) { throw new UnmarshalException("error unmarshalling catch (ClassNotFoundException var90) { throw new UnmarshalException("error unmarshalling catch (ClassNotFoundException var86) { throw new UnmarshalException("error unmarshalling catch (ClassNotFoundException var82) { throw new UnmarshalException("error unmarshalling catch (ClassNotFoundException var95) { throw new UnmarshalException("error unmarshalling

    94910编辑于 2024-12-23
  • 来自专栏Harmony学习之路

    HarmonyOS学习路之开发篇—多媒体开发(视频开发 三)

    unmarshalling(Parcel parcel) 将一个Parcel对象写入到AVDescription对象。 (可选)根据已有的Parcel对象,可以读取到AVDescription对象,实现媒体描述信息的写入,代码示例如下: boolean result = avDescription.unmarshalling

    34130编辑于 2023-10-14
  • 来自专栏微卡智享

    Android Aidl跨进程通讯(三)--进阶使用

    所以对于自己的类会报ClassNotFoundException,就会出现android.os.BadParcelableException: ClassNotFoundException when unmarshalling ClassNotFoundException 就会出现android.os.BadParcelableException: ClassNotFoundException when unmarshalling

    1.1K20编辑于 2023-09-11
  • 来自专栏区块链实战

    SpringMVC XStream 返回Xml时完美支持List,Map输出 顶

    Exception ex) { logger.debug("Could not flush HierarchicalStreamWriter", ex); } } } // Unmarshalling XmlMappingException, IOException { throw new UnsupportedOperationException("XStreamMarshaller does not support unmarshalling

    * A boolean flag is used to indicate whether this exception occurs during * marshalling or unmarshalling indicates whether the exception occurs during marshalling ( * true), or unmarshalling XStream marshalling exception", ex); } else { return new UnmarshallingFailureException("XStream unmarshalling

    2.8K20发布于 2019-03-26
  • 来自专栏JavaEdge

    RPC服务治理框架实战(一) - 手写RPC

    面向接口、策略模式、组合 问题: ➢ marshalling和unmarshalling方法该定义怎样的参数与返回值? ➢ 编组、解组的操作对象是请求、响应,请求、响应的内容是不同的。

    1.4K00发布于 2019-11-16
  • 来自专栏函数式编程语言及工具

    Akka(41): Http:DBTable-rows streaming - 数据库表行交换

    在上期讨论我们提到过这种转换其实是ROW->Json->ByteString或者反方向的转换,在Akka-http里称之为Marshalling和Unmarshalling。 spray.json.DefaultJsonProtocol import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.unmarshalling.Unmarshal spray.json.DefaultJsonProtocol import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.unmarshalling

    1.8K70发布于 2018-01-05
  • 来自专栏JavaEdge

    RPC服务治理框架实战(一) - RPC技术

    RPC相关术语 ➢ Client、 Server、 calls、 replies、 service, programs, procedures, version, marshalling(编组), unmarshalling

    2.1K20发布于 2021-02-22
  • 来自专栏酒楼

    深入解析fabric的peer命令(三)chaincodeInvokeOrQuery方法

    = nil { return errors.WithMessage(err, "error while unmarshalling proposal response payload") } = nil { return errors.WithMessage(err, "error while unmarshalling chaincode action") } if proposalResp.Endorsement

    36330编辑于 2023-06-04
  • 来自专栏Laikee Tech Space

    golang启动loki

    . // We call it with the flag values so that the config file unmarshalling only overrides the values

    1.1K20编辑于 2022-05-17
  • 来自专栏软件测试那些事

    WebMvcTest和MockBean测试Controller

    引入的各层进行单测的注解 @WebMvcTest - for testing the controller layer @JsonTest - for testing the JSON marshalling and unmarshalling

    1.8K20发布于 2020-12-02
  • 来自专栏山海散人技术

    083. RPC 技术简介

    RPC 核心概念术语 Client、Server、calls、replies、service、programs、procedures、version、marshalling(编组)、unmarshalling

    65410发布于 2021-03-03
  • 来自专栏Golang语言社区

    编写地道的Go代码

    在项目中应保持一致,比如Golang采用的写法: // marshaling // unmarshaling // canceling // cancelation 而不是: // marshalling // unmarshalling

    1.1K60发布于 2018-03-19
  • 来自专栏JavaEdge

    一文搞懂RPC

    系统间交互调用 5 RPC相关术语 Client、 Server、 calls、 replies、service、programs、procedures、version、marshalling(编组)、unmarshalling

    2.2K20编辑于 2022-11-30
  • 来自专栏Python 技术小屋

    Python exe 文件反编译为 Python 脚本

    to build the executable Run this script in Python312 to prevent extraction errors(if any) during unmarshalling Unmarshalling FAILED. Cannot extract PYZ-00.pyz.

    3.3K20编辑于 2024-04-21
  • 来自专栏JavaEdge

    如何设计一个RPC框架?

    面向接口、策略模式、组合 问题: ➢ marshalling和unmarshalling方法该定义怎样的参数与返回值? ➢ 编组、解组的操作对象是请求、响应,请求、响应的内容是不同的。

    71420编辑于 2022-11-30
  • 来自专栏一日一工具

    编写地道的Go代码

    在项目中应保持一致,比如Golang采用的写法: // marshaling // unmarshaling // canceling // cancelation 而不是: // marshalling // unmarshalling

    63430发布于 2020-07-06
领券