How can we improve Breeze.js?

JSON serialization of CLR Enum types (string/number) should be configurable (on the server/client)

Hello. I am currently working in a project using BreezeJS with Entity Framework and TypeScript.

I found it unfortunate that Breeze decided to change the server-side serialization of CLR Enum types from their numeric representation (usually int) to the string representation (.ToString()).

TypeScript supports enum types, and by defining enums both on client and server, we could have a had type-safe, strongly typed enums also in our client scripts.
The plan was to generate a TypeScript file containing all enums used across our entites as post-build-event using reflection.

But after the Breeze serialization changed, this will not work.

I would therefore really appreciate if you could make the serialization of enums configurable on the server!

39 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Jørn Andre Sundt shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base