Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why not enable json type persistence parser? #4893

Closed
zhangkyou opened this issue Jul 5, 2022 · 1 comment
Closed

why not enable json type persistence parser? #4893

zhangkyou opened this issue Jul 5, 2022 · 1 comment
Labels

Comments

@zhangkyou
Copy link

zhangkyou commented Jul 5, 2022

Version of Cadence server, and client(which language)
This is very important to root cause bugs.

  • Server version: 0.23.1
  • Client version:
  • Client langauge:

Describe the bug
common/constants.go

// Data encoding types
const (
	EncodingTypeJSON     EncodingType = "json"
	EncodingTypeThriftRW EncodingType = "thriftrw"
	EncodingTypeGob      EncodingType = "gob"
	EncodingTypeUnknown  EncodingType = "unknow"
	EncodingTypeEmpty    EncodingType = ""
	EncodingTypeProto    EncodingType = "proto3"
)

the constant encoding types include json type.But in getEncoder/getDecoder(common/presistence/serialization/parser.go) it only enable 'thriftrw' and 'proto3' type.

func getEncoder(encoding common.EncodingType) (encoder, error) {
	switch encoding {
	case common.EncodingTypeThriftRW:
		return newThriftEncoder(), nil
	case common.EncodingTypeProto:
		return newProtoEncoder(), nil
	default:
		return nil, unsupportedEncodingError(encoding)
	}
}

To Reproduce
Is the issue reproducible?

  • [Yes]
@ibarrajo
Copy link
Contributor

ibarrajo commented Nov 1, 2024

The method in the present now only gives support to the thrift encoder which I found intriegieng.

Seems like this PR #3534 does explain a bit that the encoder/decoders were being split, keeping here only thrift for common utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants