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

String[] as object deserialized to object[] #189

Closed
DaniilSokolyuk opened this issue Dec 29, 2017 · 2 comments
Closed

String[] as object deserialized to object[] #189

DaniilSokolyuk opened this issue Dec 29, 2017 · 2 comments

Comments

@DaniilSokolyuk
Copy link
Contributor

DaniilSokolyuk commented Dec 29, 2017

When using TypelessContractlessStandardResolver, and serialize object as string[], its deserialize to object[], how to save source type?

image
Code

class Program
    {
        static void Main(string[] args)
        {
            var objRaw = new SomeClass
            {
                Obj = new string[] {"asd", "asd"}
            };

var objSer = MessagePackSerializer.Serialize(objRaw, TypelessContractlessStandardResolver.Instance);

            var objDes = MessagePackSerializer.Deserialize<SomeClass>(objSer, TypelessContractlessStandardResolver.Instance);

            var expectedTrue = objDes.Obj is string[];
        }
    }

    public class SomeClass
    {
        public object Obj { get; set; }
    }
@neuecc
Copy link
Member

neuecc commented Dec 29, 2017

Thanks, I've uploaded 1.7.3.2 that includes this fix.
But this is breaking changes between previous version.

@DaniilSokolyuk
Copy link
Contributor Author

Thanks you!

AArnott pushed a commit to AArnott/MessagePack-CSharp that referenced this issue Mar 11, 2023
Bumps [Microsoft.CodeCoverage](https://github.com/microsoft/vstest) from 17.5.0-release-20230106-01 to 17.5.0-release-20230131-04.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeCoverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

No branches or pull requests

2 participants