go icon indicating copy to clipboard operation
go copied to clipboard

decode/encode thrift message without IDL

Results 17 go issues
Sort by recently updated
recently updated
newest added

```golang type A struct { Member *B } type B struct { NextA map[string]*A } ``` Use any A obj, thrifter.Marshal would run out of memory.

thrifter.ToJSON got this error sometimes, any solution?

Here is data which i'm trying to decode: Data in hex 800100020000001961757468656e7469636174654c6f6e6753657373696f6e5632000000000c00000a00010000017882717cab0b00020000006c533d733430383a553d643664396431393a453d31633165663564333461623a433d31373838323731376433383a503d3164643a413d656e2d696f732d78617574682d6e65773a563d323a483d64343966303064303839613531303434396364383538326138346133333536320a0003000001c1ef5d34ab0c00040800010d6d9d190b00020000000a7261736f726f383936340b0003000000167261736f726f3839363440697261686164612e636f6d080007000000010a000900000178826ce1880a000a00000178826ce18802000d010b000e00000004733430380c000f020004010b0006000000127261736f726f383936342e333134316163340b00140000000272750a002400000178826ce188000c00100a00010000000003c000000a0002000001792193b9800a00030000000003c00000080004000000000a000e00000178826ce1880800130000000008001700000000000c00110a00010000017882717d5602000200020003000200050002000600020007000200080002000b01000b00130000003868747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f757365722f3232353238373434392f70686f746f080015000000010c0016080001000000320a000200000000019000000a00030000000001900000080004000000640a00050000000003c00000080006000186a0080007000000fa080008000186a00800090000006408000a0000006408000b000003e808000c0000000208000d0000000208000e00000000000c00170a00010000017882717d57020002000200030002000500020006000e0007080000000200000002000000030a00090000017fda22a95702000a00000c001802000101020002000a000300000178826ce1880002001901000b00060000002d68747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f6e6f746573746f72650b00070000002468747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f0c000a0b00010000002d68747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f6e6f746573746f72650b00020000002468747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f0b00030000002d68747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f6564616d2f757365720b00040000002b68747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f7574696c6974790b00050000003068747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f6d65737361676573746f72650b0006000000237773733a2f2f77732e657665726e6f74652e636f6d2f73686172642f733430382f69640b00070000003768747470733a2f2f7777772e657665726e6f74652e636f6d2f73686172642f733430382f636f6d6d756e69636174696f6e656e67696e650b00080000004068747470733a2f2f64617368626f6172642e7376632e7777772e657665726e6f74652e636f6d2f76312f6d61696e2e68746d6c233f763d64617368626f6172640b00090000004668747470733a2f2f64617368626f6172642e7376632e7777772e657665726e6f74652e636f6d2f76312f6d61696e2e68746d6c233f763d73706163652d6469726563746f7279000000 It's okay with another server responses, although, burp suite extension https://github.com/mdsecresearch/ThriftDecoder decodes it perfectly Decoded data ```yaml {...

github.com/thrift-iterator/go imports github.com/v2pro/wombat/generic imports github.com/v2pro/plz/countlog imports github.com/v2pro/plz/countlog/stats tested by github.com/v2pro/plz/countlog/stats.test imports github.com/v2pro/plz/countlog/core: module github.com/v2pro/plz@latest found (v0.0.0-20180227161703-2d49b86ea382), but does not contain package github.com/v2pro/plz/countlog/core

When decoding a message, the `Decoder.Decode` method is called. (the following code snippet) `Line 24 (L24)` tries to decode the message, and it will check the error of `iter` on...

In section `Partial Decoding`, there is one line which could not run correctly. ```decoder := thrifter.NewDecoder(reader)``` should be ```decoder := thrifter.NewDecoder(reader, nil)```

请问,官方库是静态生成的go code序列化反序列化,thrift-iterator是用反射动态运行时序列化反序列化,为什么后者更快呢?

``` struct StructA { 1: required string s; } struct StructB { 1: optional StructA aa; 2: required StructA ab; } ``` 这种的结构体解析是如何支持的