How to transition from binary to json serialization
See original GitHub issueThe Quartz.NET Version Migration Guide states that binary serialization is not supported when targeting .NET Core.
We are migrating our application from .NET Framework to .NET Core and so far we have used binary as our serialization format.
Is there an official guide on how to transition from binary to json? Do we have to manually convert the tables columns from varbinary to varchar and if so which ones and how?
Here is our current configuration:
new NameValueCollection
{
{ "quartz.jobStore.type", "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" },
{ "quartz.serializer.type", "binary" },
{ "quartz.jobStore.dataSource", "myDS" },
{ "quartz.dataSource.myDS.connectionString", "xxxx" },
{ "quartz.dataSource.myDS.provider", "SqlServer" },
{ "quartz.scheduler.instanceName", "xxxx scheduler" },
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Serializing binary types to a JSON string
Binary value types can't be serialized to JSON in our current ... Here's one way to look at it: you can convert arbitrary...
Read more >How to convert binary data to json - python
3. Split by newlines, JSON-decode each line separately. – deceze Oct 14, 2022 at 19:28 · my_json = content.decode('utf8').split('\n') json_data ...
Read more >Binary to JSON File Saving | Unity | Settings - Part 7 - YouTube
As far as I know, binary file saving is no longer safe to use! I'm not entirely sure when this was declared but...
Read more >[SOLVED] Future-proofing the Save() function - JSON or ...
I currently make use of binary serialization to save and load the game. ... load the binary into the correct class, and then...
Read more >Replacing BinaryFormatter with Json.NET - Show
When the RPG Course Saving System was introduced in the first course, Core Combat, we used the BinaryFormatter to serialize and deserialize the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @peabnuts123 for sharing your solution, I’ve updated the JSON serialization integration documentation to include these tips and the sample serializer. I’ve also linked to this doc from migration guide.
OK I can understand your pain, that’s bad.
What about creating a composite
IObjectSerializer
that reads usingBinaryObjectSerializer
and writes back usingJsonObjectSerializer
(and configuring that for for the job store)? This would require you to create an app that uses Quartz API to load all relevant entities (triggers, jobs and calendars I guess) and then persist them back to database again effectively transforming the format?