Comments (3)
Ticker is not meant as a DTO but a VO. Consumers should wrap or translate
it. Serialization is not to taken lightly due to ongoing maintenance issues.
On 7 Dec 2012 21:42, "Aido" [email protected] wrote:
This is a request to make the Ticker class serializable so that ticker
data may be saved to file.If you do not wish to make it serializable than maybe change Ticker class
to not be final so that it can be extended.Thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/9.
from xchange.
Thinking out loud here...
Making it serializable does indeed lock the class's structure making previous versions incompatible. Here's a link: http://docs.oracle.com/javase/6/docs/platform/serialization/spec/version.html#6678.
However, as new versions of XChange roll out, with perhaps updated (and non backwards compatible) DTO objects, it doesn't mean that we are obligated to maintain compatibility at all. I'd say making them all serializable is fine if it makes things more convenient for end users. They just cannot expect compatibility, that's all. If they want that, then they need to wrap the data in their own way. While it may be convenient for them now, they may be in for a surprise later. Actually, Gary is probably right on this. The DTOs WILL change, so it's probably better for the DTOs to be wrapped/translated.
I'm also against making the DTOs non final because there are many benefits to making them final: http://www.javapractices.com/topic/TopicAction.do?Id=29
Aido, You could pretty easily create your own serializable class and pass the Ticker DTO to it's constructor, scraping the data you want to keep.
from xchange.
Both fair comments
from xchange.
Related Issues (20)
- java.lang.NoClassDefFoundError: jakarta/ws/rs/Path HOT 4
- Binance futures URL problem HOT 5
- Add bitcoin as a topic to this repository HOT 1
- [Binance-stream] Confusion about bookTicker usage HOT 1
- Converting to BinanceKlines gets this error: java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap' HOT 7
- BitfinexAdapters.adaptTicker(org.knowm.xchange.bitfinex.v2.dto.marketdata.BitfinexTicker bitfinexTicker) NPE HOT 5
- Invalid Symbol Error with ByBit v5 API Integration HOT 5
- [Binance] UserReference / ClientID not populated in Trades or Orders properly
- Bybit problem with Instrument conversion for options. java.text.ParseException: Unparseable date: "31MAY24" HOT 1
- Bankera exchange exists? HOT 1
- TradeOgreAdapters.adaptCurrencyPair() build a wrong CurrencyPair HOT 2
- org.knowm.xchange.exceptions.NotYetImplementedForExchangeException: getTrades of OkexStreamingExchange HOT 2
- [Binance] Kline class cast exception HOT 1
- [Bitstamp] WithdrawalRequest object does not support txid field HOT 4
- [Bitstamp] Implement client call for the V2 withdrawal-fees endpoint HOT 2
- Caused by: javax.net.ssl.SSLHandshakeException: No name matching www.okx.com found HOT 2
- null (HTTP status code: 200). HOT 1
- Bad field name in create order HOT 1
- [Binance] The tickerPrice does not actually implement according to the API documentation.
- [STREAM-KRAKEN] Exception java.util.ConcurrentModificationException: null is thrown HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xchange.