/spring-boot-protobuf-example

Simple Application to demo the use of Protocol Buffers alongside JSON

Primary LanguageJava

spring-boot-protobuf-example

Usage

./gradlew bootRun
curl http://localhost:8080/person/json
curl http://localhost:8080/person/protoBuf

JSON response

{
    "firstName": "Jake",
    "lastName": "Partusch",
    "emailAddress": "jakepartusch@abc.com",
    "homeAddress": "123 Seasame Street",
    "phoneNumbers": [
        {
            "areaCode": 123,
            "phoneNumber": 1234567
        }
    ]
}

ProtoBuf response

�Jake��Partusch��jakepartusch@abc.com"�123 Seasame Street*��{���K