Skip to content

Conversation

@at-bgp
Copy link

@at-bgp at-bgp commented Sep 19, 2025

Description

Add support for JSON content type in ModelSerializationService when de/serializing from/to storage.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@ivarne ivarne added feature Label Pull requests with new features. Used when generation releasenotes backport-ignore This PR is a new feature and should not be cherry-picked onto release branches labels Sep 19, 2025
@ivarne
Copy link
Member

ivarne commented Sep 19, 2025

Det var vist en liten ting til som gjensto (beklager dårlig hukommelse, det kan godt være flere)

//TODO: this method does not get enough information to know the content type from the DataType
// if we start to support more than XML
var serializedBytes = _modelSerializationService.SerializeToXml(dataToSerialize);
var contentType = "application/xml";

//TODO: this method does not get enough information to know the content type from the DataType
// if we start to support more than XML
return _modelSerializationService.DeserializeXml(bytes, type);

@ivarne ivarne added the squad/data Issues that belongs to the named squad. label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches feature Label Pull requests with new features. Used when generation releasenotes squad/data Issues that belongs to the named squad.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Analysis: Can we change default data format to JSON? And if so, how?

2 participants