संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
फ़ीड बनाते या अपडेट करते समय इकाइयों की पुष्टि करने के लिए, यहां दिए गए JSON स्कीमा का इस्तेमाल करें. ये स्कीमा, JSON स्कीमा स्पेसिफ़िकेशन पर आधारित होते हैं.
जनरेट की गई इकाइयों की पुष्टि करने के लिए यूनिट टेस्ट जोड़कर, उन समस्याओं का पता लगाया जा सकता है जिनसे फ़ीड की क्वालिटी पर असर पड़ेगा. आम तौर पर होने वाली गड़बड़ियों से बचने के लिए, अपने फ़ीड को डेवलप करने के दौरान भी इन स्कीमा का इस्तेमाल किया जा सकता है.
लाइव टीवी स्कीमा, BroadcastEvent, BroadcastService, CableOrSatelliteService, Movie, Organization, SportsEvent, TelevisionChannel, TVEpisode, TVSeason, और TVSeries इकाइयों की पुष्टि करता है.
संगीत स्कीमा, MusicAlbum, MusicGroup, MusicPlaylist, और MusicRecording इकाइयों की पुष्टि करता है.
रेडियो स्कीमा, RadioBroadcastService इकाइयों की पुष्टि करता है.
इस साइट पर मौजूद स्पेसिफ़िकेशन को सटीक जानकारी के सोर्स के तौर पर इस्तेमाल करें. ऐसा इसलिए, क्योंकि हो सकता है कि इन स्कीमा में सभी सुविधाएं लागू न हों.
दिए गए स्कीमा, ड्राफ़्ट 7 में लिखे गए हैं. इसलिए, आपने जो तरीका चुना है वह सही तरीके से काम करे, इसके लिए यह ज़रूरी है कि वह इस वर्शन के साथ काम करता हो.
पुष्टि करने का उदाहरण
नीचे दिए गए उदाहरण में, स्कीमा फ़ाइल schema.json और jsonschema Python मॉड्यूल का इस्तेमाल करके, किसी फ़ाइलfeed.json में मौजूद सभी इकाइयों की पुष्टि करने का तरीका बताया गया है. इकाइयां, डेटा फ़ीड के लिफाफ़े के दस्तावेज़ में बताए गए मुताबिक, प्रॉपर्टी dataFeedElement में मौजूद हैं.
importjsonfromjsonschemaimportvalidate# Loading the schema filewithopen("schema.json","r")asfp:schema=json.load(fp)# Opening the feedwithopen("feed.json","r")asfp:feed=json.load(fp)# Validating each entity in the feedforentityinfeed["dataFeedElement"]:try:validate(schema=schema,instance=entity)print("Entity validated successfully")exceptExceptionase:# e may contain an explanation as to why the entity wasn't validprint("Failed to validate the entity")
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],[],[[["\u003cp\u003eJSON Schemas are provided to validate entities when creating or updating your data feed, ensuring data quality and consistency.\u003c/p\u003e\n"],["\u003cp\u003eChoose the appropriate Media Actions schema (VOD, Live TV, Music, or Radio) based on the type of entities in your feed.\u003c/p\u003e\n"],["\u003cp\u003eSelect a validator implementation that supports JSON Schema draft 7 and integrate it into your workflow for automated validation.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the specification on this site as the primary source of truth for entity requirements, as schemas may not include all features.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the provided example code snippet to validate entities within your feed using the chosen schema and a compatible validator.\u003c/p\u003e\n"]]],["To validate feed entities, use the provided JSON Schemas, based on the JSON Schema specification, for different media types: Video On Demand, Live TV, Music, and Radio. Add unit tests for validation to detect issues and avoid errors during feed development. Choose a validator implementation supporting draft 7, such as the `jsonschema` python module. Validate entities by loading the schema and feed, then iterating through entities in the `dataFeedElement` property and testing with the selected implementation, printing the results.\n"],null,[]]