i'm looking solution read , write data file. data list composing of file path, name , list of compatible video formats video playback applications on system. xml data structure looks this.
<player> <name>wmp</name> <path>c:\program files (x86)\windows media player\wmplayer.exe</path> <extensionlist> <string>avi</string> <string>wmp</string> </extensionlist> </player>
i have used xmlserializer serialize list of player classes worked quite nicely , before had used sql. have heard of json , broaden options when comes storing data. have suggestions on format more suitable wpf application or if there better methods data access suites needs.
theoreretical advantage of xml can have sort of querying using xpath , potentionally work larger sets of data.
specifically in wpf have xmldataprovider, can databind ui controls directly xml nodes.
that's theory. in real world, sure deserialize xml data transfer objects, can take advantage of typed classes, compile time checking, oop, etc. in case, mentioned advantages of xml irrelavant.
on other hand, json files smaller , json serializers faster , better human readable.
file size plays role in web scenarios, need transfer data betweer client , server (it's not coincidendce json format comes javascript), isn't case. dont have care serialization performance, unless working large data sets.
neither json nor xml better or worse in case. both job , can't make wrong decision.
imho, if have been working xml, go json now, have experience both , learn new. @ end, it's few line of code , can change serialization logic else when needed.
Comments
Post a Comment