- March 24, 2007
- 12,073
- 7,459
- Home Country
- Germany
- Moderator
- #51
Looks good! Do you have the code for this available? One idea I had is a generic XML <-> JSON converter: we could use the "nice" formatted output of IXmlSerializable and transform this one from and to JSON.If I only knew To be honest, I have got no idea, what benefit I could have from using WebMP as a basis for MPAnywhere. The reason for not knowing this is just that I am no web developer. What I want is a single page web application. Can anyone explain what advantages I may have from using an ASP.Net MVC application as a base for that? My (simple) thinking is that for a single page webapp, I only need files to be served to the client, which are static - since these files only contain js-code. No html at all (besides index.html) - everything generated dynamically on the client side. What are the benefits of ASP.Net MVC in this situation?However, I think the main benefit of writing MPAnywhere based on WebMP instead of integrating WebMP with MPAnywhere is that it'll save you quite some unnecessary work, so it's entirely up to you. If you think building MPAnywhere "standalone" is easier or better, that's fine.
In the meantime I have also written
As a result, a MediaItem in Json form looks like this:
- a MediaItemJsonConverter and
- a MediaItemAspectJsonConverter.
Code:{ "Id": "99355325-d729-4e18-aca2-bf09d18a9714", "MediaItemAspects": [ { "Id": "17af940c-66ce-4d23-9d06-bf7f21c04201", "Name": "MediaItem", "Attributes": { "Title": "Future Proof", "MimeType": null, "RecordingTime": "2003-01-01T00:00:00", "Rating": null, "Comment": null, "PlayCount": null, "LastPlayed": null } }, { "Id": "0a296acd-f95b-4a28-90a2-e4fd2a4cc4ed", "Name": "ProviderResource", "Attributes": { "System-Id": "14969200-a7b6-470e-9bfb-e66bef6fd100", "Path": "{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///C:/_MP/Media/Music/01 - Future Proof.mp3", "ParentDirectory": "2c3f7296-6496-4522-b749-06d7a516c65e" } }, { "Id": "cc0163fe-55a5-426c-a29c-f1d64af7e683", "Name": "ImportedItem", "Attributes": { "LastImportDate": "2013-08-03T02:00:15.843", "Dirty": false, "DateAdded": "2013-07-29T23:13:29.167" } }, { "Id": "493f2b3b-8025-4db1-80dc-c3cd39683c9f", "Name": "AudioItem", "Attributes": { "Artists": [ "Massive Attack" ], "Album": "100th Window", "Genres": [ "Electronica", "Trip-Hop", "Downtempo", "Ambient", "Alternative" ], "Duration": 341, "Track": 1, "NumTracks": 10, "AlbumArtists": [ "Massive Attack" ], "Composers": [ "Robert Del Naja", "Neil Davidge" ], "Encoding": null, "BitRate": 192, "DiscId": null, "NumDiscs": null } }, { "Id": "a61846e9-0910-499d-9868-a1fabce7ccfd", "Name": "ThumbnailSmall", "Attributes": { "Thumbnail": null } }, { "Id": "1fda5774-9ac5-4873-926c-e84e3c36a966", "Name": "ThumbnailLarge", "Attributes": { "Thumbnail": "/9j/4AAQSkZJRgABAQAAAQABAAD [...too long...]jk8miiiudvUs//9k=" } } ] }
Is there anyone out there who already used a json object with javascript? Does this json object make sense? Should we change anything?
Thanks,
Michael
This way would be very generic and would match all serializable types.