সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি যখন আপনার ফিড তৈরি বা আপডেট করছেন তখন সত্তা যাচাই করতে, নিম্নলিখিত JSON স্কিমাগুলি ব্যবহার করুন৷ স্কিমাগুলি JSON স্কিমা স্পেসিফিকেশনের উপর ভিত্তি করে। আপনার তৈরি করা সত্তা যাচাই করার জন্য একটি ইউনিট পরীক্ষা যোগ করার মাধ্যমে, আপনি ফিডের গুণমানকে প্রভাবিত করবে এমন সমস্যাগুলি সনাক্ত করতে পারেন। সাধারণ ত্রুটিগুলি এড়াতে আপনি আপনার ফিডের বিকাশের সময়ও এই স্কিমাগুলি ব্যবহার করতে পারেন৷
প্রদত্ত স্কিমাগুলি খসড়া 7 এ লেখা হয়েছে, তাই আপনার চয়ন করা বাস্তবায়নকে সঠিকভাবে কাজ করার জন্য এই সংস্করণটিকে সমর্থন করতে হবে।
বৈধতার উদাহরণ
নিচের উদাহরণে দেখানো হয়েছে কিভাবে স্কিম ফাইল schema.json এবং jsonschema পাইথন মডিউল ব্যবহার করে একটি ফাইল 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"]],[],[[["JSON Schemas are provided to validate entities when creating or updating your data feed, ensuring data quality and consistency."],["Choose the appropriate Media Actions schema (VOD, Live TV, Music, or Radio) based on the type of entities in your feed."],["Select a validator implementation that supports JSON Schema draft 7 and integrate it into your workflow for automated validation."],["Refer to the specification on this site as the primary source of truth for entity requirements, as schemas may not include all features."],["Utilize the provided example code snippet to validate entities within your feed using the chosen schema and a compatible validator."]]],["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"]]