GithubHelp home page GithubHelp logo

IDLGen.getIDL的问题 about jprotobuf HOT 6 CLOSED

jhunters avatar jhunters commented on July 2, 2024
IDLGen.getIDL的问题

from jprotobuf.

Comments (6)

jhunters avatar jhunters commented on July 2, 2024

你的List需要指定泛型才可以。 同时你使用的版本是否最新的?
@protobuf(fieldType = FieldType.INT32, order = 1, required = false)
public List<Integer> list1;

from jprotobuf.

beykery avatar beykery commented on July 2, 2024

不是的
我是说IDLGen.getIDL(Test.class)的返回,生成的不应该是message Test{
optional string list=1;
}

而应该是:
message Test{
repeated string list=1;
}

from jprotobuf.

beykery avatar beykery commented on July 2, 2024

public class Test
{
@protobuf(fieldType = FieldType.STRING, order = 1, required = false)
private List< String > l;
}

IDLGen.getIDL(Test.class)以后:

message Test {
optional string l=1;
}
应该是:
message Test{
repeated string l=1;
}吧?

from jprotobuf.

jhunters avatar jhunters commented on July 2, 2024

这个在 1.7.0 版本已经修复了,请使用该 版本. 补充一下,必须List对象指定泛型的,否则也无法进行序列化

from jprotobuf.

xiemalin avatar xiemalin commented on July 2, 2024

该问题的确存在, 将在 1.7.1版本修复,谢谢!

from jprotobuf.

xiemalin avatar xiemalin commented on July 2, 2024

Fixed at 1.7.1

from jprotobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.