Skip to content

Conversation

@DOBEN
Copy link
Member

@DOBEN DOBEN commented Dec 2, 2025

Purpose

As the public_info type includes cbor values that are passed as json parameters to this service, derive serde::Serialize and serde::Deserialize on cbor::value::Value.

Concordium/concordium-misc-tools#271

Changes

  • Derive serde::Serialize and serde::Deserialize on cbor::value::Value.

/// Generic CBOR data item that can represent
/// any data item type.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
Copy link
Contributor

@limemloh limemloh Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a very nice json representation of the CBOR, can we avoid implementing serde on the type here? It is not really clear how it behaves, so I would move it to the application to figure out and not have to deal with it in concordium-base.

Copy link
Contributor

@allanbrondum allanbrondum Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I don't think the CBOR value type here should be concerned with JSON serialization.

@DOBEN DOBEN closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants