2 रिपॉजिटरी
Transfers data between Go types by matching fields, methods, and tags at runtime without manual assignment.
Distinct from Reflection-Based Data Binding: Distinct from Reflection-Based Data Binding: focuses on data transfer between types rather than request payload binding.
Explore 2 awesome GitHub repositories matching web development · Reflection-Based Data Mappers. Refine with filters or upvote what's useful.
Copier is a Go library that deep copies data between structs, maps, and slices using reflection-based field mapping and struct tag controls. At its core, it automatically transfers values by matching source and destination fields by name, type, and methods, creating fully independent copies of nested data structures to prevent shared references and unintended mutations. The library distinguishes itself through tag-driven copy rules that give developers fine-grained control over the copying process. Struct tags can enforce mandatory field copying, exclude specific fields from transfer, or map
Transfers data between Go types by matching fields, methods, and tags at runtime.
YYModel एक JSON मॉडल मैपिंग लाइब्रेरी और द्विदिश डेटा मैपर है जिसे कच्चे JSON डेटा को संरचित मॉडल ऑब्जेक्ट्स में बदलने के लिए डिज़ाइन किया गया है। यह एक टाइप-सेफ JSON पार्सर के रूप में कार्य करता है जो पार्सिंग प्रक्रिया के दौरान असंगत डेटा प्रकारों के कारण होने वाले एप्लिकेशन क्रैश को रोकने के लिए स्वचालित प्रकार जबरदस्ती (type coercion) का उपयोग करता है। यह फ्रेमवर्क नामकरण नियमों और स्पष्ट कॉन्फ़िगरेशन के आधार पर JSON कुंजियों को मॉडल गुणों में मैप करने के लिए रनटाइम आत्मनिरीक्षण (introspection) का उपयोग करता है। यह डेटा पदानुक्रम के पुनरावर्ती ट्रैवर्सल के माध्यम से नेस्टेड मॉडल ऑब्जेक्ट्स के इंस्टेंटिएशन का समर्थन करता है और सीरियलाइज़ेशन और डीसीरियलाइज़ेशन दोनों के लिए एक सुसंगत अनुवाद लेयर प्रदान करता है। इसकी क्षमता सतह बेमेल कुंजियों को गुणों से जोड़ने के लिए डेटा मैपिंग लॉजिक और एक सीरियलाइज़ेशन वर्कफ़्लो को कवर करती है जो ISO8601 प्रारूप का उपयोग करके दिनांक ऑब्जेक्ट्स को मानकीकृत करती है। यह टूल नेटवर्क ट्रांसमिशन या स्थानीय भंडारण के लिए टाइप सुरक्षा सुनिश्चित करने के लिए स्कीमा-संचालित दृष्टिकोण का उपयोग करके कच्चे शब्दकोशों को संरचित ऑब्जेक्ट्स में बदल देता है।
Uses runtime introspection and reflection to instantiate nested models and map data based on predefined naming rules.