StringEpsilon / PhpSerializerNET

A .NET library for working with the PHP serialization format

Repository from Github https://github.comStringEpsilon/PhpSerializerNETRepository from Github https://github.comStringEpsilon/PhpSerializerNET

Feature request: Support String to guid conversion

sommmen opened this issue · comments

Sample:

a:1:{i:0;s:36:"82e2ebf0-43e6-4c10-82cf-57d60383a6be";}

It would be nice if i could translate the LabelId property here to a guid directly. Right now it throws unfortunately:

image

As a sidenote, i can do new GuidConverter().ConvertFromInvariantString(null, "82e2ebf0-43e6-4c10-82cf-57d60383a6be"); and it works fine.

Apperently Guid does not implement IConvertible.
https://stackoverflow.com/a/13066991/4122889

I'm also thinking general TypeConverter support would be cool so you can write custom converters - but idk about performance and so on for that one. Seems like supporting a Guid string is a broad enough use-case which would fit nicely in this library tho.