question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

serialize function

See original GitHub issue

When you map an object with custom property names: @JsonProperty('serverName') myCustomName:number;

It’d be usefull a function serialize() to reconvert again to server object.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
jf3096commented, Oct 2, 2016

This is a viewmodel(vm) concept. If the project is develop independently with a front end developer and a backend programmer, we should assume there is no communication between them (because we could use vm concept to connect and adapt data and prevent data dependency).

Therefore, in this case, for a home page which require user info viewmodel, and your personal profile page require a profile viewmodel. Since no communication between front end and back end, the backend developer develop one api for both pages and what front end developer needs to do is to adapt it (use json-typescript-mapper) and things done. From here, we could know that,

This is one way, which is server data to client side data one api raw data could map to many viewmodel. (1 to 1…*)

Therefore, I didnt design for the other way round.

2reactions
jf3096commented, Feb 16, 2017

I will get this done by this weekend since so many people suggesting the serialize. Thanks to @dankmo , he made a PR long ago about the serialize function. I have read it and I will validate it by this week. Go through unit tests and release it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

serialize - Manual
Generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure....
Read more >
.serialize() | jQuery API Documentation
The .serialize() method creates a text string in standard URL-encoded notation. It can act on a jQuery object that has selected individual form...
Read more >
serialize function
The function serialize serializes object to the specified connection. If connection is NULL then object is serialized to a raw vector, which is...
Read more >
Serialization
In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored...
Read more >
How can I serialize a function in JavaScript?
7. why do you want to serialize a function? · 6. What if the function being serialised references variables/functions in the containing scope?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found